This repository has been archived on 2024-10-29 . You can view files and clone it, but cannot push or open issues or pull requests.
				
			
		
		
		
			
				
					
						
					
					9e6bf25c834f46ed2a4a3c4f492a07d427fc15e1
				
			
			
		
	Thream/api
📜 About
Thream's Application Programming Interface (API) to stay close with your friends and communities.
⚙️ Getting Started
Prerequisites
- Node.js >= 16.0.0
- npm >= 8.0.0
- PostgreSQL
Installation
# Clone the repository
git clone https://github.com/Thream/api.git
# Go to the project root
cd api
# Configure environment variables
cp .env.example .env
# Install
npm install
You will need to configure the environment variables by creating an .env file at
the root of the project (see .env.example).
Local Development environment
Setup the database
# Create a new user and database
psql
create database thream_database;
create user thream_user with encrypted password 'password';
ALTER USER thream_user WITH SUPERUSER;
Replace DATABASE_URL inside .env with postgresql://thream_user:password@localhost:5432/thream_database
# Run Prisma migrations
npm run prisma:migrate:dev
Usage
# Run API
npm run dev
# Run Prisma Studio
npm run prisma:studio
Production environment with Docker
# Setup and run all the services for you
docker-compose up --build
Services started
- API : http://localhost:8080
- PostgreSQL database
💡 Contributing
Anyone can help to improve the project, submit a Feature Request, a bug report or even correct a simple spelling mistake.
The steps to contribute can be found in CONTRIBUTING.md.
📄 License
Description
				Thream's Application Programming Interface (API) to stay close with your friends and communities.
						
						
							
								 https://api.thream.divlo.fr/documentation
							
						
						
						
						
							
								 Readme
							
						
						
						
						
							
							
							 2.7 MiB
						
					
					Languages
				
				
								
								
									TypeScript
								
								95.9%
							
						
							
								
								
									EJS
								
								2.2%
							
						
							
								
								
									Handlebars
								
								1%
							
						
							
								
								
									JavaScript
								
								0.5%
							
						
							
								
								
									Dockerfile
								
								0.3%