This is the server of a fullstack blog-platform-app
blog-platform-client is here
This is a API created using node.js and express. Client app is here.
- Prisma ORM with MongoDB.
- Routes: user, posts, comments, likes, follow.
- Controllers for this routes.
- JWT authentication.
- Generating an avatar when creating a new account using the jdenticon library.
- Dockerfile configuration.
- Docker-compose configuration: express-app, database and client-app containers.
npm install -g npm@latest
- Clone the repo with API:
git clone https://github.com/dmitrygvl/blog-platform-API.git
- Clone the repo with client app:
git clone https://github.com/dmitrygvl/blog-platform-client.git
- Open a terminal (or command line) and go to the root directory of the server:
cd blog-platform-API
- Rename the .env.local file to .env:
mv .env.sample .env
- Rename the env.local file to env:
mv .env.sample .env
- Set your secret key in the env file. it can be any string:
SECRET_KEY='YOUR_SECRET_KEY'
- Run the docker build command. The blog-platform-API and blog-platform-client folders must be in the same directory:
docker compose up
- Open your browser and go to http://localhost:80 to see the running project.