This is a Next.js responsive project bootstrapped with create-next-app
and uses MongoDB Atlas for the datastore.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
Run the Jest test:
npm run test
Run the Cypress test:
npm run test:cypress
Run the Cypress test with the LaunchPad:
npm run test:cypress:open
- MongoDB connection timeout issue.
- It should be related to IP whitelisting. I have given access to all IPs and tested on a different machine with Mobile hotspot. If problem persists, maybe have a look local
etc/hosts
or other local config files.
Instructions
Write a Node project that:
- reads in the file
data.json
transforms it into a format that matchesexample-output.json
- load transformed data into a datastore - store can be of your choice, in memory or a local database
- Create an API that has 2 get API calls. One for customers and one for orders that pull data from the datastore
- Create a simple UI that calls the API and displays the customer and the customers orders
- Solution should be implemetned in TypeScript.
- Read JSON
data.json
async from it's directory, convert data async, write into datastore async - Solution should be run from the command line using
npm run
. - Solution should be non-blocking.
- Solution should use React or modern equivilent for UI
- Solution APIs should be REST compliant
Your work will be evaluated primarily on:
- Consistency of coding style.
- Correct use of promises, including proper error handling.
- Correct use of TypeScript, including interface/object definitions.
- Absence of "callback hell".
- Correct and complete unit test coverage.
- General quality of code and technical communication.
- Fork this project on github.
- Update this README.md file with instructions on how to build/test/run your script.
- When you're finished, send us the URL of your public repository.