Starting a new project using the TypeScript Server Boilerplate
When starting a new project based on the boilerplate, you need to change and rename a few files and directories to match your project's name.
The following steps will guide you through the process of creating a new project based on the boilerplate.
- Create a new repository in GitHub. Make sure to set the boilerplate as the template repository.
- Clone the new repository to your local machine.
git clone https://github.com/MapColonies/my-new-amazing-repo.git
or if you prefer using ssh:
git clone git@github.com:MapColonies/my-new-amazing-repo.git
- Set the name of the project in the
package.json
andpackage-lock.json
files. Change thename
field to match your project's name.
{
"name": "my-new-amazing-repo",
...
}
-
Edit the
README.md
file to match your project's name and description. You can also add any additional information that is relevant to your project. -
Rename any mention of
ts-server-boilerplate
in the codebase to match your project's name. You should use VS Code or any other IDE to search for the termts-server-boilerplate
and replace it with your project's name. -
Rename the
src/resourceName
andsrc/anotherResource
directories and change the content of the files inside them to match your project's resources. You can also add any additional resources that are relevant to your project. -
Edit the liveness probe in the
src/index.ts
file to match your project's needs. The liveness probe is responsible for checking the health of the application and returning a response to the client. The liveness probe is configured to return a 200 OK response if the application is healthy, otherwise the application is unhealthy. -
Run your project to make sure everything is working as expected.
npm run start:dev
-
Change the tests to match your project's resources. You can also add any additional tests that are relevant to your project.
-
Run your tests to make sure everything is working as expected.
npm run test
From here on, you can start developing your project using the boilerplate as a starting point. The boilerplate includes many features and packages to make the development process easier and faster and ensure common practices and standards.
Check the boilerplate documentation for more information on the features and packages included in the boilerplate.