2021-05-02 14:40:41 +02:00
|
|
|
<p align="center">
|
|
|
|
<img width="100" src="https://raw.githubusercontent.com/fosscord/fosscord/master/assets/logo_big_transparent.png" />
|
|
|
|
</p>
|
|
|
|
<h1 align="center">Fosscord HTTP API Server</h1>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<a href="https://discord.gg/ZrnGQP6p3d">
|
|
|
|
<img src="https://img.shields.io/discord/806142446094385153?color=7489d5&logo=discord&logoColor=ffffff" />
|
|
|
|
</a>
|
|
|
|
<img src="https://img.shields.io/static/v1?label=Status&message=Development&color=blue">
|
|
|
|
<a title="Crowdin" target="_blank" href="https://translate.fosscord.com/"><img src="https://badges.crowdin.net/fosscord/localized.svg"></a>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
## [About](https://github.com/fosscord/fosscord-api/wiki)
|
2021-04-22 23:29:06 +02:00
|
|
|
|
|
|
|
This repository contains the Fosscord HTTP API Server
|
2021-02-03 11:52:49 +01:00
|
|
|
|
|
|
|
## Bug Tracker
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-04-06 19:44:32 +02:00
|
|
|
[Project Board](https://github.com/fosscord/fosscord-api/projects/2)
|
2021-02-03 11:52:49 +01:00
|
|
|
|
|
|
|
## API
|
|
|
|
|
2021-04-22 23:29:06 +02:00
|
|
|
We use [express](https://expressjs.com/) for the HTTP Server and
|
2021-02-03 11:52:49 +01:00
|
|
|
[lambert-server](https://www.npmjs.com/package/lambert-server) for route handling and body validation (customized).
|
|
|
|
|
|
|
|
## Contribution
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
You should be familiar with:
|
|
|
|
|
2021-04-22 23:29:06 +02:00
|
|
|
- [Git](https://git-scm.com/)
|
|
|
|
- [NodeJS](https://nodejs.org/)
|
|
|
|
- [TypeScript](https://www.typescriptlang.org/)
|
|
|
|
- [MongoDB/mongoose](http://mongoosejs.com/)
|
|
|
|
|
|
|
|
and the other technologies we use
|
2021-02-03 11:52:49 +01:00
|
|
|
|
|
|
|
### Getting Started
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
Clone the Repository:
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
```bash
|
2021-04-06 19:44:32 +02:00
|
|
|
git clone https://github.com/fosscord/fosscord-api
|
2021-02-03 11:52:49 +01:00
|
|
|
cd discord-server
|
|
|
|
```
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
#### Install (dev)dependencies:
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
```bash
|
|
|
|
npm install
|
|
|
|
npm install --only=dev
|
|
|
|
```
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
#### Starting:
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
```
|
|
|
|
npm start
|
|
|
|
```
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
#### Debugging:
|
2021-04-22 23:29:06 +02:00
|
|
|
|
2021-02-03 11:52:49 +01:00
|
|
|
**Vscode:**
|
2021-04-22 23:29:06 +02:00
|
|
|
The Launch file configuration is in `./vscode/launch.json`,
|
|
|
|
so you can just debug the server by pressing `F5` or the `> Launch Server` button
|