Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serifcolakel/node-template
https://github.com/serifcolakel/node-template
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/serifcolakel/node-template
- Owner: serifcolakel
- Created: 2023-10-13T15:06:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-13T15:11:26.000Z (about 1 year ago)
- Last Synced: 2024-11-09T02:52:36.565Z (2 months ago)
- Language: TypeScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# REST API with Node.js + Express.js + TypeScript
This sample demonstrates how to refactor the calculator API with MVC (Model View Controller) pattern and object-oriented programming. The refactored code uses Domain Object to represent business logic, Data Access Object (DAO) for data access, Data Mappers to convert between Domain Object and Data Transfer Object (DTO), and controller to coordinate workflows. The refactored code improves separation of concern and is more modular and maintainable.
### Pre-requisites
- [Node.js](https://nodejs.org/en/download) v18 or higher
### Instructions
1. Clone the repository with this branch.
```shell
git clone -b main
```2. Install dependencies.
```shell
npm install
```3. Run Express.js server.
```shell
# for Windows
npm run dev:win# for Linux / macOS
npm run dev
```