set cookie using nest js
async login(@Body('username') username: string, @Body('password') password: string, @Res() res: Response) {
const token = await this.authService.validateUser(username, password);
res.set('Authorization', 'Bearer ' + token);
res.send({
success: true,
token,
})
});
Also in JavaScript:
- foreach key value javascript
- how to call a function with a button in javascript
- Email validation using javascript
- react suspense chunck
- Javascript generator example
- chart js line and bar
- add sass to react
- remove space from string javascript
- how to swap two images in javascript
- phaser game height
- difference between key and code in javascript
- npx for windows
- console in jsfiddle site:stackoverflow.com
- react how to manipulate children
- downgrade node version windows using npm
- $.post jquery beforesend loader
- calculate time difference in javascript
- chart.js on hover and onclick event
- jquery checkbox checked value
- graphql file upload
- How to check if a member has a role discord.js
- js add element to array
- js while
- remove extra space in string javascript