This is a project to deploy a Typescript based Node server. Whole stack is in TypeScript, giving you the advantage to code in one single language throughout your development.
- Install "Node.js" (https://nodejs.org)
- Package manager i.e. NPM or YARN
- From project root folder install all the dependencies:
npm i
oryarn i
Using "concurrently", TypeScript compiler and Express server are initiated. Default PORT is 4466, however you can change it in the .env file.
** If using NPM **
npm run start
** If using YARN **
yarn run start
With the help of nodemon, any changes done in the server, will automatically trigger server to restart to show the latest updates.
-
Using POSTMAN: Create a GET request ->
http:localhost:4466/api/test
-> Hit Send -
Using BROWSER: In URL bar, enter
http:localhost:4466/api/test
-> Hit Enter
If you see following response, then all worked👍
{"route":"/api/test","status":"success"}
Feel free to fork and push changes, I'll be more than happy to see any advancements. Happy Developing your next project.
Created with ❤️ by Hrishikesh Sharma