This is a boilerplate project for building a Node.js application using TypeScript and Koa framework.
- Integration of Node.js, TypeScript, and Koa.
- Docker support for containerization.
- Database integration using TypeORM.
- API routing with Koa Router.
- User creation functionality with validation.
- Test framework setup using Jest.
- ESLint and Prettier for code formatting and linting.
- Configuration management with dotenv.
- Node.js (v12 or higher)
- Yarn package manager
- Docker (optional)
- Clone the repository:
git clone https://github.com/krlls/Nodejs-TypeScript-starter- Install dependencies:
cd Nodejs-TypeScript-starter
yarn install- Build and start the application:
yarn devThe application will be running at http://localhost:3000.
- Make changes to the source code in the
srcdirectory.
To build the application, run:
yarn buildThe compiled JavaScript files will be generated in the dist directory.
To run tests, use the following command:
yarn testTo build a Docker image of the application, use the following command:
yarn build:dockerTo run the Docker image in a container, use the following command:
yarn build:dockerThe application uses environment variables for configuration. Create a .env file in the root directory and provide the required environment variables.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This boilerplate is based on the work of ksmi and the Nodejs-TypeScript-Koa-boilerplate repository.
For any questions or inquiries, please contact krrllsm@gmail.com.