https://github.com/nda17/node-express-server
Node-express-server
https://github.com/nda17/node-express-server
colors compression cors dotenv express-js helmet jest morgan node-js prisma supertest ts-node-dev tsconfig-paths typescript zod-validation
Last synced: 6 days ago
JSON representation
Node-express-server
- Host: GitHub
- URL: https://github.com/nda17/node-express-server
- Owner: nda17
- Created: 2024-08-23T10:53:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-25T02:03:42.000Z (over 1 year ago)
- Last Synced: 2025-02-13T15:18:44.291Z (12 months ago)
- Topics: colors, compression, cors, dotenv, express-js, helmet, jest, morgan, node-js, prisma, supertest, ts-node-dev, tsconfig-paths, typescript, zod-validation
- Language: TypeScript
- Homepage:
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# «Node-express-server»
## _Implementation features:_
Node.js server with implementation using the Express.js framework.
Interaction with the Postgres database is carried out through Prisma (ORM).
## _The project implements the "Publication" entity._
## _The following queries were created:_
- [GET] _Request to get all "Publication" entities from the database_
- [GET] _Request to obtain a specific entity from the database by its "id"_
- [CREATE] _Request to create the entity "Publication" in the database with the properties "id", "createdAt", "updatedAt", "title", "description"_
- [PUT] _Request to update entity properties by "id" in the database_
- [DELETE] _Request to delete an entity by "id" from the database_
---
## _Testing:_
Added unit tests (Jest) for testing CREATE and PUT requests
---
## _Used stack:_
- [V] Express.js
- [V] Typescript
- [V] Ts-node-dev
- [V] Prisma
- [V] Helmet
- [V] Morgan
- [V] Zod
- [V] Dotenv
- [V] Compression
- [V] Jest
- [V] Supertest
---
## _Database:_
- [V] PostgreSQL
---
## _Adding personal settings to the .env environment variable:_
- PORT = 4200
_DEVELOPMENT mode or PRODUCTION mode (select one mode):_
- NODE_ENV = production
- NODE_ENV = development
_Path to database:_
- DATABASE_URL = postgresql://postgres:postgres@localhost:5432/blog?schema=public
---
## _Compiles and minifies for production:_
- pnpm run build
- npm run build
---
## _Getting started online development server:_
- pnpm run dev
- npm run dev
---
## _Running unit tests:_
- pnpm run test
- npm run test