Skip to content

Instantly share code, notes, and snippets.

View muhammed-mukthar's full-sized avatar

Muhammed_Mukthar muhammed-mukthar

  • Kochi,India
View GitHub Profile
FROM node:17-alpine
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
const jwt = require("jsonwebtoken");//require jwt
//setting token
const accessToken = jwt.sign(
{
id: AdminLogin._id,//data you want incluede
},
process.env.JWT_SEC,
const mongoose=require('mongoose')
mongoose.connect(
process.env.MONGO_URL
).then(()=>console.log('db connection is succesffull'))
.catch((err)=>console.log(err,'fss')
)