- Node.js (14.x)
- NPM
- TypeScript
- Git
- Docker - Install Docker community edition optional.
🎁 If you are a fan of docker, then pull the docker image by following the commands:
docker pull sazal/typescript-password-validator
Let's clone the repository on your machine.
The application includes the following files and folders.
src
- Code for the application written in TypeScript, Express.js.cli
- Node cli script which can be performed from terminal.__tests__
- to test all the features..env.example
- A sample of .env which can be helpful for configuration.
Let's move to the cloned directory with your terminal.
To install, build, and start the application for the first time, run the following commands in your shell using makefile
(only for macOS and Linux):
make install
Let's rename from .env.example
to .env
and make sure all the necessary information is correct:
PORT=3000
DB_HOST=localhost
DB_PORT=
DB_DATABASE=
DB_USER=
DB_PASSWORD=
Already done? Cool! You are almost ready to enjoy the app. ⛳️
make build
make start
make test
make test-unit
Oh! You want to try the application cli feature from terminal
make node-cli
make lint
make lintfix
To learn more, you can use the following commands:
make help
npm i
npm run build
npm run start
npm run cli