Please note this project has been developed for a coding exercise.
- The project requires node engine >
14.xx.xx - Run
yarn install - Populate a .env file with needed variables (check .env.example).
- Run
yarn devto start development
build:prodBuilds the project for production modebuild:devBuilds the project for development with hotmodule replacementdevStarts dev server + watch for files to restart on changeswatchRuns webapck in watch mode (mostly used bydevscript)nodemonRuns the dev server. it's used bydevscript.lintExports eslint command and requries a file/dir path to linttestRuns jest teststest:watchRuns jest tests with --watch
- Always use
yarnovernpm - All functions should use
Named Parameters - Project uses babel to transpile the code which is in
src/directory. The output is inbuilddirectory. - Response data is enveloped:
- For success respone :
{result: {} | []} - For error response:
{error: {} | []}
- For success respone :
- To send errors back to user, throw an error object with the following structure:
{ statusCode: 4xx, message: 'Some Related Error Message', name: 'ERROR_NAME' // unique id for this error type ...rest // any more data needed with this error }