Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duyvu997/x-node-backend
backend, nodejs, nestjs, postgres, typeorm, authentication, authorization
https://github.com/duyvu997/x-node-backend
Last synced: 11 days ago
JSON representation
backend, nodejs, nestjs, postgres, typeorm, authentication, authorization
- Host: GitHub
- URL: https://github.com/duyvu997/x-node-backend
- Owner: duyvu997
- License: mit
- Created: 2024-06-28T07:16:47.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-28T07:18:41.000Z (5 months ago)
- Last Synced: 2024-06-28T08:39:39.199Z (5 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# x-node-backend
This project serves as a backend service using Node.js - NestJS, integrating PostgreSQL with TypeORM, and providing authentication and authorization mechanisms. It uses GraphQL for frontends and gRPC for services.
## Installation
Clone the repository and install dependencies:
```bash
git clone [email protected]:duyvu997/x-node-backend.gitcd x-node-backend
npm install
```### Running the Project Locally
#### init environment
Copy file env.example:
```bash
cp env.example .env
```
then replace the value of variables with the real valueTo install deps:
```bash
npm install
```To run the project locally, use:
```bash
npm run start:dev
```This will start the Node.js server locally.
### Building for Production
To build the project for production, use:
```bash
npm run build
```#### build docker image
```bash
docker build -t nestjs-app .
``````bash
docker run -d -p 3000:3000 -p 50051:50051 nestjs-app
```This will compile TypeScript files and generate the production build.
### Additional Notes