Skip to content

rolling-scopes-school/nodejs-aws-cart-api

 
 

Repository files navigation

nodejs-aws-cart-api

Installation

npm install

Running the app

# development
npm run start

# watch mode
npm run start:dev

# production mode
npm run start:prod

Test

# unit tests
npm run test

# e2e tests
npm run test:e2e

# test coverage
npm run test:cov

Create user and get auth token

register user with POST http://localhost:4000/api/auth/register

Body:

{
  "name": "your_github_login",
  "password": "TEST_PASSWORD"
}

get token with POST http://localhost:4000/api/auth/login

Body

{
  "username": "your_github_login",
  "password": "TEST_PASSWORD"
}

Response

{
  "token_type": "Basic",
  "access_token": "eW91ckdpdGh1YkxvZ2luOlRFU1RfUEFTU1dPUkQ="
}

Or you can do it with bash script, make sure you have installed curl in your system

Put content of env.example to .env and update credentials:

cat env.example > .env

Create user and get token

./get-token.sh

if command failed make script executable

chmod +x ./get-token.sh

About

CartApi for NodeJS in AWS course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 93.3%
  • JavaScript 3.9%
  • Shell 2.8%