This commit is contained in:
Max 2024-02-20 11:52:12 +00:00
parent 9977177bf8
commit 397626e98b
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
FROM node:latest
FROM node:16.15.1-buster-slim
WORKDIR /app
@ -10,6 +10,6 @@ COPY . .
RUN npm install
RUN npm install pm2 -g
EXPOSE 5000
EXPOSE 5001
CMD ["pm2-runtime", "server.js"]

View File

@ -35,7 +35,7 @@ let transporter = nodemailer.createTransport({
const validateFirebaseIdToken = (req, res, next) => {
console.log("Running pre-function")
console.log(req.cookies); //// <----- issue this is empty {} why??
console.log(req.cookies); //// <----- issue this is empty {} why??
console.log("Finished pre function")
next();
};
@ -268,7 +268,7 @@ app.get('/user-profile', function(request, responce){
return allProductsDict[obj].status == 'on-sale';
})
let filteredProducts = {"0":{img: '',name: 'Nothing listed 😢',price: ''}}
filteredKeys.forEach(function(key){filteredProducts[key] = allProductsDict[key]})
if (Object.keys(filteredProducts).length > 1) {delete filteredProducts["0"]}
@ -755,8 +755,8 @@ app.post('*', function(request, responce){
responce.status(404).send({success:false, error:"404"})
})
var port = 5000
var port = 5001
app.listen(port, function() {
console.log('Server running on port ' + port)
})
})