Express.js server starter with TypeScript
yarn
yarn dev
This Runs the app in the development mode.
Open http://localhost:8080 to view it in your browser.
If it shows Hello There!
then the server is running successfully.
yarn build
Generates the JS output in dist
folder.
yarn start
Runs the js code from dist
folder.
yarn format
yarn test
Note:
You can use any package manager of your choice
This uses prettier to format the code according to config defined in .prettierrc.yaml
file
throw new CustomError(500, "Unexpected Server ERROR");
- here first argument to send is statuscode and second argument is any form of string or any
docker build -t <image-name> .
docker run -e CLIENT_BASE_URL=localhost:8080 -p 8080:8080 -it <image-name>
Note:
If you are not usingyarn
as package manager then change to respective package manager inDockerfile