Simple monorepo app built with Next & Express. I opted to use Next.js instead of vanilla React because it allows for faster project setup with TypeScript, Tailwind, and testing configurations. The app features a simple UI, testing suites (using Jest) and a single API route that solves the following problem:
Given the upper limit of n, find the median prime number(s) of the set of prime numbers less than n.
In order to run, you must have the latest version of VS Code, Node >= 14.0.0 and npm >= 5.6 installed on your machine.
- Download this solution as a ZIP and Un-zip or clone the repo to a local directory.
- Navigate to folder in your editor of choice.
- Repeat the following for both the frontend and backend folders:
- In the terminal: "npm i". This will install all dependencies.
- In the terminal: "npm run test". This will run the test suite and validate that everything is working correctly.
- In the terminal: "npm run dev". This will run the web app at http://localhost:3000 and the server at http://localhost:4000.
Note: To stop running local instance, "CTRL + C" in the terminal to stop instance and select yes.
I have 2 years of professional experience working with both Node.js and React. I've structured this project in a way that allows for seamless expansion, requiring only minor modifications to transform it into a fully-fledged production application.