Sign inSign up

mravinale/node-starter

By mravinale

Updated over 7 years ago

Typescript Express REST API starter project with CRUD demo

Image
0

1.0K

mravinale/node-starter repository overview

CircleCI

Node Starter

Start application

  • start with dev database yarn start:dev
  • start with local database yarn start:local dbname={dbname} dbusername={dbusername} dbpassword={dbpassword}

tsoa api

Swagger

  • <url>/api-docs

Commands

  • instalation: yarn install
  • dev: yarn start build tsoa routes, swagger definitions and starts the server on development mode listening to file changes (swagger definition changes will require a manual restart)
  • test: yarn test unit and integration tests
  • build: yarn build production build
  • prod: yarn start:prod starts the server on production mode
  • local: yarn start:local lets the user sets the database via arguments
    • required arguments:
      • dbname=LOCAL_DBNAME
      • dbusername=LOCAL_USERNAME
      • dbpassword=LOCAL_PASSWORD
    • default arguments (can be overriden):
      • dbhost=localhost
      • dbport=3306
      • dbdialect=postgres

Scaffolding

  • config express server, DB connection, Logger, etc
    • env .env files
  • controllers routes configuration
  • persistance data abstraction layers
    • Entities classes and interfaces representing entities.
  • services business logic to be used primary by controllers
    • Dtos Data transfer objects, to decouple domain from Rest resources
  • utils
  • tests

Docker

Tag summary

Content type

Image

Digest

Size

296.9 MB

Last updated

over 7 years ago

docker pull mravinale/node-starter