Skip to content

Latest commit

 

History

History
78 lines (60 loc) · 2.71 KB

File metadata and controls

78 lines (60 loc) · 2.71 KB

accounting-services/libs/utils

Houses the utilities that can be shared across different microservices under accounting-services. Some examples are shared datamodels for organization accounts & users, sentry setup, normative-server sdk. This was started as a "fork" of the normative-server code with this functionality.

Library Generation

This library was generated with Nx. Steps followed:

nx g @nrwl/nest:library --publishable --buildable --importPath @normative/utils
nx build utils
cd dist/libs/utils
npm publish

Development

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

Running unit tests

Tests are written using Jest.

$ nvm use
$ npm run test utils

Repo structure

./
├── src/
  ├── lib/
    ├── app-config/                   -- Common configuration setup
    ├── auth//                        -- Houses the common authentication utils
    ├── components/                   -- Container for sharable components like errors, middleware
    ├── config/                       -- Container for environment setup
    ├── data-upload-sdk/              -- Houses the SDK for data-upload
    ├── database/                     -- Houses the database setup
    ├── datamodels/                   -- Houses the data schemas
    ├── normative-server-sdk/         -- Houses the SDK for normative-server
    ├── sentry/                       -- Houses the data schemas
    ├── shared/                       -- Houses the misc stuff
    └── validators-transformers/      -- Houses the data validators and transformers
  └── index.ts                        -- Script to start the microservice
├── README.md
├── jest.config.js
├── package.json
├── tsconfig.json
├── tsconfig.lib.json
└── tsconfig.spec.json