This is a social media backend app built using Node.js, Express, Prisma, and PostgreSQL. The app allows users to post and comment on various topics, fostering a vibrant community.
- User registration and authentication using JSON Web Tokens (JWT).
- Create, read, update, and delete posts.
- Comment on posts and reply to comments.
- Like and react to posts and comments.
- Real-time updates using WebSockets. (coming soon)
-
Clone the repository.
-
Install the required dependencies by running the following command inside the Node.js project directory: npm install
-
Create a
.env
file in the root of the Node.js project and add the following configurations: DATABASE_URL=your_postgres_connection_string_here JWT_SECRET=your_jwt_secret_here -- Replaceyour_postgres_connection_string_here
with your PostgreSQL database connection URL andyour_jwt_secret_here
with your desired JWT secret for authentication. -
Migrate the database schema using Prisma by running the following command: -- npx prisma migrate dev
-
Start the Node.js server: -- npm start
The app should now be running on your device/emulator.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.