borolgs / rvt-scripts-backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Revit Scripts Backend

Tests

Backend for Scripts. Wrapper around Github's API.

Live Demo

https://rvt-scripts.herokuapp.com

API

Run in Postman

POST Sign Up

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"
}

POST Log In

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"
}

Get Scripts

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>

Get Users

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>

Usage

  1. Create .env file

    MONGO_URI=your/mongo/path
    GUTHUB_TOKEN=github_token
    GITHUB_USERNAME=github_user
    GITHUB_REPO=github_repo
    JWT_SECRET=secret
    
  2. Look at the ./src/domains/entities/code.entity.ts and modify to suit your needs.

  3. Run

    npm i
    npm run start:dev
    

    or

    docker-compose up
    

About


Languages

Language:TypeScript 97.5%Language:JavaScript 2.1%Language:Dockerfile 0.4%