Backend for Scripts. Wrapper around Github's API.
https://rvt-scripts.herokuapp.com
https://rvt-scripts.herokuapp.com/auth/signup
POST /auth/signup HTTP/1.1
Host: https://rvt-scripts.herokuapp.com
Content-Type: application/json
{
"email": "user@mail.com",
"password": "password",
"name": "Ivan"
}
https://rvt-scripts.herokuapp.com/auth/login
POST /auth/login HTTP/1.1
Host: https://rvt-scripts.herokuapp.com
Content-Type: application/json
{
"email": "user@mail.com",
"password": "password"
}
https://rvt-scripts.herokuapp.com/api/v1/scripts
GET /api/v1/scripts HTTP/1.1
Host: https://rvt-scripts.herokuapp.com
Scripts-Sha: <COMMIT_HASH>
Authorization: Bearer <TOKEN>
Admin only
https://rvt-scripts.herokuapp.com/api/v1/users
GET /api/v1/scripts HTTP/1.1
Host: https://rvt-scripts.herokuapp.com
Authorization: Bearer <TOKEN>
-
Create .env file
MONGO_URI=your/mongo/path GUTHUB_TOKEN=github_token GITHUB_USERNAME=github_user GITHUB_REPO=github_repo JWT_SECRET=secret
-
Look at the ./src/domains/entities/code.entity.ts and modify to suit your needs.
-
Run
npm i npm run start:dev
or
docker-compose up