A basic NodeJS server in which is implemented a database and jwt authentication.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
TYPEORM_CONNECTION = mysql
TYPEORM_HOST = localhost
TYPEORM_USERNAME = root
TYPEORM_PASSWORD = admin
TYPEORM_DATABASE = test
TYPEORM_PORT = 3000
TYPEORM_SYNCHRONIZE = false
TYPEORM_LOGGING = true
TYPEORM_ENTITIES = src/**/*.entity{.ts,.js}
Server running on http://localhost:3000
Requires Bearer Token Authentication Header
Content of post request
{
"username": "mario",
"password": "alla"
}
Content of post request
{
"username": "mario",
"password": "alla"
}