This project was made using Node.js and Express and consists on an API used for a social network back-end workprocess.
- Sign-up and sign-in with jwt authentication
- User search
- Publishing posts
- Listing posts with pagination
- Listing 10 most popular hashtahgs
- Users' posts
- Hashtags' posts
- Post edition and deletion
- Interactions with post (likes, comments and re-posts)
You can check project's simplified documentation here.
Clone the project in your server with the following command:
-
Create a
.envfile in the root of the project. Populate it based on the.env.examplefile. Keep all the values already set in the.env.exampleand provide only the following:POSTGRES_USERNAMEPOSTGRES_PASSWORDPOSTGRES_DATABASETOKEN_SECRETDATABASE_URL
-
The
DATABASE_URLmust be completed considering the pattern below:postgresql://<POSTGRES_USERNAME>:<POSTGRES_PASSWORD>@<POSTGRES_HOST>:<POSTGRES_PORT>/<POSTGRES_DATABASE>?schema=public -
Create a self-signed certificate by running the following command at the
src/config/level:openssl req -nodes -new -x509 -keyout server.key -out server.certAfter running this command, you would get some options to fill. You can keep those options default or empty by entering ‘.‘ (dot).
Make sure that both
server.keyandserver.certare created and inside the config folder. -
Finally, at the root level of the project, run
docker compose upto spin up the linkr server. -
(Optional) Run
docker compose down -vto stop the linkr server.