/nest-blog

Primary LanguageTypeScript

Nest Logo

Blog Using NestJs and Mysql

Installation

$ git clone https://github.com/MahmoudNaguib/nest-blog.git
$ cd nest-blog

// Update your environment variables 
$ cp .env.example .env  

$ npm install

// Give write access to public/uploads
$ sudo chmod -R 777 public/uploads 

Running the app

# Run database migration
$ npm run migration

# Run database seeders
$ npm run seed

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

URL: localhost:8000

Features

- Users: Register/Login

- Authentication: Using token based return after successfull login. This token will send in header (Authorization:'Bearer {token}')

- Token will be changes if user Logout/Edit Profile/Change password

- Edit Profile/Change password/Logout

- Posts Sections: List

- Posts : List / Details / Filter 

- My Posts: List/Details/Create/Edit/View/Delete

- Comments: List post comments / Create comments

Default user

Email: user1@demo.com
Password: demo@12345

POSTMAN API

https://documenter.getpostman.com/view/375068/UVRAJSzK
Add the following variables
url=localhost:8000
email=user1@demo.com
password=demo@12345 

Serving uploaded

{baseURL}/uploads/small/{imageName}
{baseURL}/uploads/large/{imageName}

Serving assets

{baseURL}/assets/{.....}