Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lissone/node-api-template
Template made in Typescript with Express and structured with an architecture based on clean and DDD.
https://github.com/lissone/node-api-template
commitlint docker-compose eslint express husky nodejs postgresql typeorm typescript yup
Last synced: 2 days ago
JSON representation
Template made in Typescript with Express and structured with an architecture based on clean and DDD.
- Host: GitHub
- URL: https://github.com/lissone/node-api-template
- Owner: Lissone
- Created: 2021-03-30T01:17:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T15:42:45.000Z (2 months ago)
- Last Synced: 2024-09-16T16:52:13.676Z (2 months ago)
- Topics: commitlint, docker-compose, eslint, express, husky, nodejs, postgresql, typeorm, typescript, yup
- Language: TypeScript
- Homepage:
- Size: 557 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Node Express API Template
Description |
Requirements |
Technologies |
Endpoints |
Usage
## Description
Template made in Typescript with Express and structured with an architecture based on clean and DDD, to facilitate the creation of new projects and developer productivity, which can be created from this one.
Already configured with Typescript, ORM, Linter and Husky, with a pre-built CRUD and endpoints listed in the documentation.
### Requirements
- [Nodejs](https://nodejs.org/en/)
- [Npm](https://www.npmjs.com/)
- [Docker](https://www.docker.com/)### Technologies
- NodeJs
- Typescript
- Express
- TypeORM
- PostgreSQL
- Yup
- Eslint
- @lissone/eslint-config/node
- Commitlint
- config-conventional
- Husky### Endpoints
Base url: https://localhost:5000/api/v1
![GET](https://img.shields.io/badge/-GET-70BB60?style=for-the-badge)
/user![GET](https://img.shields.io/badge/-GET-70BB60?style=for-the-badge)
/user/:email![POST](https://img.shields.io/badge/-POST-2991B8?style=for-the-badge)
/user![PATCH](https://img.shields.io/badge/-PATCH-99768C?style=for-the-badge)
/user/:email![DELETE](https://img.shields.io/badge/-DELETE-DF807E?style=for-the-badge)
/user/:email### Usage
You can use this project as a template for another one, or clone it on your pc using the command:
```bash
git clone https://github.com/Lissone/node-api-template.git
cd node-api-template
```Install dependencies using:
```bash
npm install
```Need to add environment variables:
```bash
# .\.env# APP
PORT=5000# POSTGRESQL
POSTGRESQL_HOST=localhost
POSTGRESQL_PORT=5432
POSTGRESQL_USERNAME=docker
POSTGRESQL_PASSWORD=docker
POSTGRESQL_DATABASE=exampledb
```You must have **Docker installed** on your machine to get the container up.
**Up PostgreSQL service** in a **Docker container** on your local machine using:```bash
docker-compose up -d
# View all running containers
docker ps
```Run api:
```bash
npm run dev
```## License
Distributed under the MIT License. See `LICENSE` for more information.
Made with ❤️ by Lissone