A toy robot simulator written in NodeJs.
This project serves as a simple Toy Robot Simulator command line app created using Vanilla Javascript and NodeJs.
To get started with this project, follow these simple steps:
- Clone this repository to your local machine
- Make sure you have
node
andnpm
installed. Follow these instructions if you don't have either of them yet. npm install
in the root directory to install all dependencies.npm start
in the root directory to start the app.- The app will start and you can enter commands to play with the robot. Follow the prompts for more details.
If you have trouble running the app directly or don't want to install any dependencies, you can run the app in a container using the premade Dockerfile.
- Make sure you have
docker
installed. Follow these instructions to install. An alternative ispodman
which is also open source (instructions). - Navigate to the root directory and build the image
docker build -t robot-app .
- Start the app by entering
docker run -it robot-app npm start
This project was created using test-driven development because I truly care about quality 🤩 Many test cases were considered including happy path, error cases, edge cases when developing the app. Test data are part of the test files.
npm test
to run all the unit tests available.
You can also run the tests in a container.
- Follow all the instructions to build the image specified in Running app in a container
- Run the tests by entering
docker run -t robot-app npm test
I hope you find this project enjoyable and fun. Happy roboting 🤖🤖🤖