This repo is a code challenge of remote work, all demands were done, and the tests code coverage over 99%.
This project uses generator-express-no-stress-typescript to generate the boilerplate.
Try it on Online Swagger UI (authorize need)
Uses ExcelJS to import csv/xlsx file to create products. The
parserOptions.headers
option not wroking in current version(v4.3.0) of exceljs. In this project, uses this PR version (I created this PR).
ts-node v10.8.1
have a bug when coverage reporting, see #1797, #1790, rollback tov10.8.0
.
# install deps
npm install
# create your .env file and edit it
cp .env.example .env
# run in development mode
npm run dev
Then open http://localhost:3000 on your browser to try this API in Swagger UI.
Run the Mocha tests.
# unit test
npm run test:unit
# integration test
npm run test:integration
# full test
npm run test
# code coverage
npm run test:coverage
Compiles the application and starts it in production production mode.
npm run compile
npm start