This GitHub template provide an easy start in typescript and node.
directly from the template with git
git clone https://github.com/moglerdev/ts-node-template.git
because I used for this template you should also use it, and you will not regret it. :D
pnpm install
# or
pnpm i
this will start the dev server with nodemon, so you can change the code and the server will restart automatically.
It will also enable inspect mode, so you can debug your code with vscode or any other debugger.
pnpm dev
before we can start the server in production mode we need to build the code.
pnpm build
this will start the server in production mode.
pnpm start
I like docker, so you also need to like it. :D
We need to build the docker image first. For this we can use the following command. The image will be named ts-node-template
.
docker build -t ts-node-template .
For test purpose you can run the docker container with the following command. When you stop the container it will be removed automatically. So also no port mapping is needed.
docker run -p --rm ts-node-template
This template is licensed under the MIT License.
You can use it for free for personal and commercial use. But you need to mention me in your project.