0.0.1 • Published 4 years ago

care-connect-backend-api v0.0.1

Weekly downloads
1
License
MIT
Repository
bitbucket
Last release
4 years ago

Care Connect Backend Api

Base Dependencies

Be sure you have yarn installed globally.

Some important packages

This project uses external packages for some common functionality. Here is a list of the most important ones to be considered:

PackageUsage Description
expressNodeJS server library
typescriptJavascript superset to handle class and abstraction
tslintLinting tool to handle code rules
yarnNode package manager
mssqlSQL Server Database connection
babelTranspiles JS code to plain js files
nodemonChange detection on code
joiEndpoint schema validations
morganHttp request logger
helmetAdd security layer to requests
mochaUnit test runner
chaiTest assertion library

Local Environment Setup

Once repo is downloaded and base dependencies are installed on local machine:

Install Project Dependencies

All the dependencies necessary for the project are managed using Yarn

$ git clone git clone git@bitbucket.org:akavamere/care-connect-api.git backend-api
$ cd backend-api
$ yarn

That should create the node_modules folder with all the necessary dependencies for the project to run locally.

Start local dev server

$ NODE_ENV=dev yarn dev-start

Start local qa server

$ NODE_ENV=qa yarn start

Start local prod server

$ NODE_ENV=prod yarn start

That should start the local server running on: http://localhost:3000

Generate New Build

To generate a build we use the Angular-Cli see ng build for more information about the build params.

$ yarn build

All the previous commands should generate a dist folder which could be deployed to desired server.

Available commands:

  • yarn start: Executes Nodemon & refreshes app on file-change
  • yarn lint: Executes TSLint & TypeScript tsc (typecheck)
  • yarn build Builds app as regular Javascript (es2015) to /dist
  • yarn test Iterates all .spect.ts files and generetes report on console

Todo:

  • Swagger API documentation setup
  • Build optimizations