This project was created using themetalfleece/nodejs-typescript-template
- Edit
package.json
to set the project name, version, description, and author. - Edit the
LICENSE
file to use your name in the Copyright section. - Delete this section from the
README.md
file.
- Install node.js, yarn (or use npm).
- Clone this repository, and using a terminal navigate to its directory.
- Run
yarn
ornpm install
to install the dependencies.
- Copy the contents of the
.env.example
file to a.env
next to it, and edit it with your values. - Run
yarn build
ornpm build
to build the files. - Run
yarn start
ornpm start
to start the application.
- You can run
yarn dev
ornpm dev
to combine the 2 steps above, while listening to changes and restarting automatically.
-
Build:
docker build -t my-app .
Replacing
my-app
with the image name. -
Run
docker run -d -p 3000:3000 my-app
Replacing
my-app
with the image name, and3000:3000
with thehost:container
ports to publish.
- Run
yarn lint
ornpm lint
to lint the code. - Run
yarn format
ornpm format
to format the code.
Check the placeholder test examples to get started :
/src/sum.ts
that provide a functionsum
/test/sum.spec.ts
who test thesum
function
This files are just an example, feel free to remove it
- Run
yarn test
ornpm test
to execute all tests. - Run
yarn test:watch
ornpm test:watch
to run tests in watch (loop) mode. - Run
yarn test:coverage
ornpm test:coverage
to see the tests coverage report.