Thream's Application Programming Interface (API) to stay close with your friends and communities. https://api.thream.divlo.fr/documentation
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.
Go to file
2022-08-23 23:58:38 +02:00
.devcontainer build(deps): update latest 2022-08-23 21:53:07 +00:00
.github ci: fix prisma:validate error in CI 2022-08-23 23:58:38 +02:00
.husky feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
.vscode chore: reset initial prisma/migration 2022-03-21 16:08:33 +01:00
email chore: initial commit 2021-10-24 04:06:16 +02:00
generators/service feat: usage of ESM modules imports (instead of CommonJS) (#5) 2022-03-20 11:49:27 +01:00
prisma chore: reset initial prisma/migration 2022-03-21 16:08:33 +01:00
src build(deps): update latest 2022-08-23 21:53:07 +00:00
.commitlintrc.json chore: initial commit 2021-10-24 04:06:16 +02:00
.dockerignore feat: usage of ESM modules imports (instead of CommonJS) (#5) 2022-03-20 11:49:27 +01:00
.editorconfig chore: initial commit 2021-10-24 04:06:16 +02:00
.env.example fix: file upload and OAuth2 (#10) 2022-04-08 21:36:29 +02:00
.eslintrc.json feat: usage of ESM modules imports (instead of CommonJS) (#5) 2022-03-20 11:49:27 +01:00
.gitattributes chore: cleanup 2022-02-07 16:18:11 +00:00
.gitignore fix: file upload and OAuth2 (#10) 2022-04-08 21:36:29 +02:00
.lintstagedrc.json build(deps): update latest 2022-08-23 21:53:07 +00:00
.markdownlint-cli2.jsonc build(deps): update latest 2022-08-23 21:53:07 +00:00
.npmrc chore: initial commit 2021-10-24 04:06:16 +02:00
.nycrc.json chore: reset initial prisma/migration 2022-03-21 16:08:33 +01: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 chore: configure correctly semantic-release 2022-04-08 21:43:34 +02:00
.swcrc feat: usage of ESM modules imports (instead of CommonJS) (#5) 2022-03-20 11:49:27 +01:00
.taprc feat: usage of ESM modules imports (instead of CommonJS) (#5) 2022-03-20 11:49:27 +01:00
CODE_OF_CONDUCT.md feat: migrate from express to fastify 2021-10-24 04:18:18 +02:00
CONTRIBUTING.md build(deps): update latest 2022-08-23 21:53:07 +00:00
docker-compose.yml feat: usage of ESM modules imports (instead of CommonJS) (#5) 2022-03-20 11:49:27 +01:00
docker-start.sh fix(services): restrict GET /uploads/messages/:file to authorized users 2022-01-06 18:13:13 +01:00
Dockerfile build(deps): update latest 2022-08-23 21:53:07 +00:00
LICENSE chore: initial commit 2021-10-24 04:06:16 +02:00
package-lock.json build(deps): update latest 2022-08-23 21:53:07 +00:00
package.json build(deps): update latest 2022-08-23 21:53:07 +00:00
plopfile.js feat: usage of ESM modules imports (instead of CommonJS) (#5) 2022-03-20 11:49:27 +01:00
README.md feat: update file-uploads-api to v1.1.0 2022-06-29 03:58:26 +00:00
tsconfig.json feat: usage of ESM modules imports (instead of CommonJS) (#5) 2022-03-20 11:49:27 +01:00

Thream/api

Licence MIT Contributor Covenant

Conventional Commits semantic-release

📜 About

Thream's Application Programming Interface (API) to stay close with your friends and communities.

It uses Thream/file-uploads-api v1.1.0.

⚙️ 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