2
1
mirror of https://github.com/Thream/api.git synced 2024-07-06 21:00:11 +02:00
Thream's Application Programming Interface (API) to stay close with your friends and communities. https://api.thream.divlo.fr/documentation
Go to file
2022-02-07 16:18:11 +00:00
.devcontainer feat(services): add GET /guilds/[guildId] 2021-12-28 18:19:53 +00:00
.github fix(services): restrict GET /uploads/messages/:file to authorized users 2022-01-06 18:13:13 +01:00
.husky feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
.vscode fix(services): restrict GET /uploads/messages/:file to authorized users 2022-01-06 18:13:13 +01:00
email chore: initial commit 2021-10-24 04:06:16 +02:00
generators/service feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
prisma feat(services): add GET /channels/[channelId]/messages 2021-12-29 11:44:16 +00:00
src chore: cleanup 2022-02-07 16:18:11 +00:00
uploads feat(services): add PUT /guilds/[guildId]/icon 2021-10-26 14:01:49 +00:00
.commitlintrc.json chore: initial commit 2021-10-24 04:06:16 +02:00
.dockerignore feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
.editorconfig chore: initial commit 2021-10-24 04:06:16 +02:00
.env.example feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
.eslintrc.json feat: add realtime with socket.io 2022-01-13 16:33:16 +00:00
.gitattributes chore: cleanup 2022-02-07 16:18:11 +00:00
.gitignore feat: add realtime with socket.io 2022-01-13 16:33:16 +00:00
.lintstagedrc.json chore: cleanup 2022-02-07 16:18:11 +00:00
.markdownlint.json feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
.npmrc chore: initial commit 2021-10-24 04:06:16 +02:00
.prettierignore fix(services): restrict GET /uploads/messages/:file to authorized users 2022-01-06 18:13:13 +01:00
.prettierrc.json feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
.releaserc.json feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
.swcrc feat(services): add POST /channels/[channelId]/messages/uploads 2022-01-01 14:19:27 +00:00
CODE_OF_CONDUCT.md feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
CONTRIBUTING.md feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
docker-compose.yml feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
docker-start.sh fix(services): restrict GET /uploads/messages/:file to authorized users 2022-01-06 18:13:13 +01:00
Dockerfile fix(services): improve validation PUT /users/current 2022-01-29 22:31:37 +01:00
jest.config.json feat(services): add POST /channels/[channelId]/messages 2022-01-01 01:35:56 +00:00
LICENSE chore: initial commit 2021-10-24 04:06:16 +02:00
package-lock.json chore: cleanup 2022-02-07 16:18:11 +00:00
package.json chore: cleanup 2022-02-07 16:18:11 +00:00
plopfile.js feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
README.md chore: cleanup 2022-02-07 16:18:11 +00:00
tsconfig.json feat(services): add POST /channels/[channelId]/messages 2022-01-01 01:35:56 +00:00

Thream/api

Licence MIT Contributor Covenant

Conventional Commits semantic-release

📜 About

Thream's application programming interface to stay close with your friends and communities.

This project was bootstrapped with create-fullstack-app.

⚙️ Getting Started

Prerequisites

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

💡 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

MIT