A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
Bless this open-source tool that provided a good skeleton with CRUD entry points for this REST API project that I, Tamieem Jaffary, have created myself.
This is my first time ever using TypeScript for a project for the record. I learned everything I've done for this project while I was doing it. So apologies if my instructions are not thorough or incorrect. I tried to make a dockerized container with all of my necessary files and image configurations.
My Task was to model the subway system
$ npm install
# First must build docker volume
$ docker-compose up
# development
$ npm start
These endpoints were hosted on localhost:3000 for me. I'm going to make the assumption that it will be the same when it is tested.
POST /train-line -- Creates A train with its listed stations
stations - each station (or stop) on the train line
name - of the train line
fare - The cost of taking this train
POST /train-line
{
"stations": ["Canal", "Houston", "Christopher", "14th"],
"name": "1"
"fare": 2.75
}
GET /ride/[originStation]/[destinationStation] -- Returns the optimal station list from the origin station to the destination station
POST /card -- Creates/Updates a Debit Card in the database with a balance
number - The Card number to create/update
balance - the amount to add on to the card
{
"number": "1234",
"balance": 10.0
}
To Simulate a Ride:
POST /ride/[station]/enter
POST /ride/[station]/exit
I have also included my Postman collection, "Subway Surfer.postman_collections.json" which I used to test the required endpoints in the project as a reference if necessary.
I'd like to take this moment in my Readme to thank you guys for looking into my project. It was challenging but also fun and exciting. It motivated me to build something robust and substantial like this and practice my genuine software engineering skills.