This repository serves as a template for kickstarting Node.js projects with TypeScript. It provides a structured and scalable foundation for building robust applications.
- Node.js: Server-side JavaScript runtime for building scalable network applications.
- TypeScript: A typed superset of JavaScript that compiles to plain JavaScript.
- Express.js: A fast, unopinionated, minimalist web framework for Node.js.
- npm: Package manager for Node.js to manage project dependencies.
- Linting: Includes ESLint for code linting based on best practices.
- Testing: Basic setup for unit testing using Jest.
-
Clone the Repository:
git clone https://github.com/Void-Monarch/Node-ts-template.git
-
Install Dependencies:
cd Node-ts-template npm install
-
Build the Project:
npm run build
-
Run the Project:
npm start
The server will start at
http://localhost:3000
by default.
nodejs-ts-template/
│
├── src/
│ ├── controllers/
│ │ └── ... # Controller logic
│ ├── routes/
│ │ └── ... # Route definitions
│ ├── app.ts # Express application setup
│
│
├── index.ts # Entry point
├── .eslintrc.js # ESLint configuration
├── jest.config.js # Jest configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Project dependencies and scripts
└── README.md # Project documentation
npm start
: Starts the server.npm run build
: Transpiles TypeScript code to JavaScript.npm test
: Runs Jest tests.npm run lint
: Lints the code using ESLint.
Feel free to contribute to enhance this template. Open issues for suggestions or bug reports, and submit pull requests to contribute directly.
This project is licensed under the MIT License - see the LICENSE file for details.