/shopify-demo

Shopify code challenge

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Shopify code challenge

CI Coverage Status

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 to v10.8.0.

Quick Start

Get started developing...

# 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.

Test It

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

Run in production mode:

Compiles the application and starts it in production production mode.

npm run compile
npm start