0.0.1 • Published 5 years ago
care-connect-backend-api v0.0.1
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:
| Package | Usage Description |
|---|---|
| express | NodeJS server library |
| typescript | Javascript superset to handle class and abstraction |
| tslint | Linting tool to handle code rules |
| yarn | Node package manager |
| mssql | SQL Server Database connection |
| babel | Transpiles JS code to plain js files |
| nodemon | Change detection on code |
| joi | Endpoint schema validations |
| morgan | Http request logger |
| helmet | Add security layer to requests |
| mocha | Unit test runner |
| chai | Test 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
$ yarnThat 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-startStart local qa server
$ NODE_ENV=qa yarn startStart local prod server
$ NODE_ENV=prod yarn startThat 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 buildAll 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-changeyarn lint: Executes TSLint & TypeScripttsc(typecheck)yarn buildBuilds app as regular Javascript (es2015) to/distyarn testIterates all .spect.ts files and generetes report on console
Todo:
- Swagger API documentation setup
- Build optimizations
0.0.1
5 years ago