This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose=require('mongoose') | |
mongoose.connect( | |
process.env.MONGO_URL | |
).then(()=>console.log('db connection is succesffull')) | |
.catch((err)=>console.log(err,'fss') | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jwt = require("jsonwebtoken");//require jwt | |
//setting token | |
const accessToken = jwt.sign( | |
{ | |
id: AdminLogin._id,//data you want incluede | |
}, | |
process.env.JWT_SEC, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:17-alpine | |
WORKDIR /app | |
COPY package.json . | |
RUN npm install | |
COPY . . |