https://github.com/remy349/rest-api-blog-node-express
Rest API developed with Express and Node + TypeScript
https://github.com/remy349/rest-api-blog-node-express
expressjs jest nodemon prisma rest-api supertest typescript
Last synced: about 2 months ago
JSON representation
Rest API developed with Express and Node + TypeScript
- Host: GitHub
- URL: https://github.com/remy349/rest-api-blog-node-express
- Owner: Remy349
- Created: 2024-05-07T05:44:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-17T01:52:37.000Z (about 2 years ago)
- Last Synced: 2025-10-16T10:42:52.045Z (9 months ago)
- Topics: expressjs, jest, nodemon, prisma, rest-api, supertest, typescript
- Language: TypeScript
- Homepage:
- Size: 229 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rest API developed with Express and Node + TypeScript
A simple Rest API for the purpose of learning how to develop using Node and Express along with the use of TypeScript. It is based on the functionality of a blog, it has the basic functions of creating categories, making posts, user creation and login.
## Technologies used for its development
- NodeJS
- ExpressJS
- TypeScript
- Jest and Supertest (For testing purposes)
- Prisma ORM
- MySQL as database
- MVC
- JWT for session creation and management
## How to execute the project
You will need a file `.env` in the root of the project, inside you will need to add two important environment variables:
```
DATABASE_URL=""
JWT_SECRET=""
```
After you have done this, install the project dependencies:
```
> npm install
```
Add the models found in the file `prisma/schema.prisma` to your database:
```
> npx prisma push
```
Execute the API:
```
> npm run dev
> rest-api-blog-node-express@1.0.0 dev
> nodemon src/server.ts
[nodemon] 3.1.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts,json
[nodemon] starting `ts-node src/server.ts`
Server is running at http://localhost:3000
```