"Martian Robots" challenge with NodeJS.
Features:
- Developed following SOLID principles
- Developed following Clean Architecture principles
- The app works with the example proposed in the challenge description
- Coordinates and command length limits stablished as environment variables
- Unit and integration tests (coverage up to 80%)
- Solution implemented as a REST API server
- Persistence layer implemented with MongoDB and InMemory
- Shipped with Docker
Requisites:
- NodeJS >v14.0
- Docker & Docker Compose
git clone https://github.com/AntonioMartinezFernandez/node-martian-robots.git
cd node-martian-robots
npm i
npm run test
npm run lint
docker compose up
It return the status server.
It return the historical missions data.
It allow to send a new mission.
Request format:
{
"FieldSurface": ["5 3"],
"MissionCommands": [
["1 1 E", "RFRFRFRF"],
["3 2 N", "FRRFLLFFRRFLL"],
["0 3 W", "LLFFFRFLFL"]
]
}
Response format:
{
"MissionResult": [
[
"1 1 E"
],
[
"3 3 N LOST"
],
[
"4 2 N"
]
]
}