⚠️ This project is not maintained anymore, you can still use the code as you wish and fork it to maintain it yourself.
## 📜 About Thream's Application Programming Interface (API) to stay close with your friends and communities. It uses [Thream/file-uploads-api](https://github.com/Thream/file-uploads-api) [v1.1.8](https://github.com/Thream/file-uploads-api/releases/tag/v1.1.8). ## ⚙️ Getting Started ### Prerequisites - [Node.js](https://nodejs.org/) >= 16.0.0 - [npm](https://www.npmjs.com/) >= 8.0.0 - [PostgreSQL](https://www.postgresql.org/) ### Installation ```sh # Clone the repository git clone git@github.com:Thream/api.git # Go to the project root cd api # Install dependencies npm clean-install # Configure environment variables cp .env.example .env # Generate Prisma client types npm run prisma:generate ``` ### Database Setup ```sh # Create a new user and database psql CREATE DATABASE thream; CREATE USER thream_user with encrypted password 'password'; ALTER USER thream_user WITH SUPERUSER; ``` ### Database Production migration ```sh npm run prisma:migrate:deploy ``` ### Local Development environment Recommended to use [VSCode: Remote development in Containers](https://code.visualstudio.com/docs/remote/containers-tutorial). #### Database Development migration ```sh # Run Prisma migrations npm run prisma:migrate:dev # Reset the database (WARNING: This will delete all data) npm run prisma:migrate:reset ``` #### Usage ```sh npm run dev ``` ##### Services started - `api`: