An open API service indexing awesome lists of open source software.

https://github.com/sohanemon/genius-car-server


https://github.com/sohanemon/genius-car-server

backend jwt mongo server

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

## Create a secret key

```js
require("crypto").randomBytes(64).toString("hex");
```
## Passing to the header
```js
axios.post(
`${process.env.REACT_APP_server}/jwt`,
{ data: "" }, // at least something needs to be passed
{
headers: {
authorization: user.email,
},
}
);
```
> `axios.post(URI,body,config)` should be in this serial

- to use only config/headers as `axios.post(URI,'',config)` or `axios.post(URI,{},{headers: {token: 123})`