Skip to content

Latest commit

 

History

History
77 lines (57 loc) · 2.19 KB

File metadata and controls

77 lines (57 loc) · 2.19 KB

accounting-services/data-upload

Serves API end-points for any functionality related to Business Carbon Calculator (Free version).

Development

🚧 Warning

It is currently not possible for developers not associated with Normative to start this service as it requires access to protected resources.

One time Set-up

One time set-up, for system dependencies such as nvm and npm. Before beginning, ensure nvm is installed and you're a member of npmjs.com/org/normative.

$ nvm use
$ npm login # login to personal npm account
$ nvm install-latest-npm

Environment Setup

Make a copy of .env.dev.sample, fill the values (ex: MONGO_URI) and save as .env.dev in the same folder.

Local server

$ nvm use
$ npm install
$ npm start data-upload # running on localhost:3333

Running unit tests

Tests are written using Jest.

$ nvm use
$ npm run test data-upload

Repo structure

./
├── src/
  ├── app/                  -- Home for starting the microservice.
  ├── assets/               -- Contains trademarked assets
  ├── calculatedImpact/     -- Houses the application logic for fetching impacts.
  ├── starter/              -- Houses the application logic for processing a starter entry
  ├── constants.ts          -- Houses the shared constants
  └── main.ts               -- Script to start the microservice
├── Dockerfile
├── README.md
├── jest.config.js
├── tsconfig.app.json
├── tsconfig.json
└── tsconfig.spec.json