$ npm i -g @nestjs/cli
$ npm install
$ npm run start:dev
By default NestJS runs under 3000 port number. To change it go to 'src/main.ts' await app.listen(4000)
Go to 'main.ts'
app.enableCors({
credentials:true,
origin:"http://localhost:8080",
});
To change user 'email' and 'password' go to src/users/user.service.ts
To change the jwt token expiration go to 'src/auth/auth.module.ts'.
#600s --> 600 seconds
signOptions: {
expiresIn: '600s',
}
#POST endpoint
http://localhost:3000/auth/login
#default credentials payload
{
'email': 'naveen@techseeker.com',
'password':'12345
}
#GET endpoint
http://localhost:3000/user-profile
#GET endpoint
http://localhost:3000/liked-movies
#GET endpoint
http://localhost:3000/refresh-token
#GET endpoint
http://localhost:3000/logout
- Author - Naveen Bommidi
- Website - Blog
- Youtube - Naveen Bommidi Tech Seeker