This project was created using themetalfleece/nodejs-typescript-template
- Edit
package.jsonto set the project name, version, description, and author. - Edit the
LICENSEfile to use your name in the Copyright section. - Edit the
.prettierrc.jsonfile with your preferred values. - Remove the
.github/workflows/upgrade-dependencies.ymlfiles, since it contains the workflow to upgrade all dependencies on a daily basis.- In case you would like to keep it, remove lines 7, 30, 32 from it. Also, change the git user name in line 28.
- Delete this section from the
README.mdfile. - Start coding by editing the
src/app.tsfile!
- Install node.js, yarn (or use npm).
- Clone this repository, and using a terminal navigate to its directory.
- Run
yarnornpm installto install the dependencies.
- Copy the contents of the
.env.examplefile to a.envnext to it, and edit it with your values. - Run
yarn buildornpm buildto build the files. - Run
yarn startornpm startto start the application.
- You can run
yarn devornpm devto combine the 2 steps above, while listening to changes and restarting automatically.
-
Build:
docker build -t my-app .Replacing
my-appwith the image name. -
Run
docker run -d -p 3000:3000 my-appReplacing
my-appwith the image name, and3000:3000with thehost:containerports to publish.
- Installing the Eslint (
dbaeumer.vscode-eslint) and Prettier - Code formatter (esbenp.prettier-vscode) extensions is recommended.
- Run
yarn lintornpm lintto lint the code. - Run
yarn formatornpm formatto format the code.
Check the placeholder test examples to get started :
/src/app.tsthat provide a functionsum/test/app.spec.tswho test thesumfunction
This files are just an example, feel free to remove it
- Run
yarn testornpm testto execute all tests. - Run
yarn test:watchornpm test:watchto run tests in watch (loop) mode. - Run
yarn test:coverageornpm test:coverageto see the tests coverage report.