Simulation of a toy robot moving on a square tabletop.
Author: Seep Gulati Linkedin | Twitter
Benji Toy Robot simulation is built using a simple REST API with NodeJS and Express. PostMan has been used for integration testing and Jest for unit testing. HTML, Javascript and Bootstrap for the front-end.
Back End - Nodejs & Expressjs | Front End - Javascript, HTML and Bootstrap
- Javascript - ES7
- Node - 10.16.0
- Express - 4.16.1
- NPM as a packet manager gave access to various libraries and programs and easily manage the installation process.
- Visual Studio Code helped in writing source-code and supported debugging.
The first thing you need to have is Node.js on your computer.You can download the Node.js installer from the Node.js website at: https://nodejs.org/en/download/
Once Node.js is installed, open a terminal and enter the node --version on command line to verify that it is installed correctly. This application is using Node 10.16.0 version.
-
You need to open the repository in a code editor of your choice. I'm using visual studio code. Download link: https://code.visualstudio.com/docs/setup/mac
-
cd into repository and run below command to start the express server.
npm start -
Once server is running, you will see following on command line -'Benji listens to your commands on port 3000'.
-
To view UI in the browser. Open http://127.0.0.1:3000/index.html
-
To run tests
npm test