- clone the project: https://github.com/p4309027/imagination-nodejs.git
- change the directory:
cd imagination-nodejs
- install required packages:
npm i
- download
.env
file from here and place it in the main directory of the project - optional: update
.env
file by adding app hosted URL link,LEAGUE_SERVER_HOSTNAME=app-hosted-url-link
- to run the app:
npm start
- to test the app:
npm test
Notes for testing: the app has been developed using ES module import and export
statements. However, the validate.js
file has been developed using commonJS module system,
and the 'require()' is not defined in ES module scope. To mitigate the issue and treat the file as a CommonJS script, the file extension should be renamed to '.cjs'
, i.e. validate.cjs
before running the test.
company details: Imagination
company git repo: https://github.com/Imagination/nodejs-brief