Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 1.2 KB

README.md

File metadata and controls

69 lines (45 loc) · 1.2 KB

NESBox API

development

install postgresql, diesel, create database, create .env file:

DATABASE_URL=postgres://username:password@localhost/database_name

init database:

diesel migration run

start:

cargo watch -x run

manage games

use github issue

exposes local port to a remote server, can use bore:

bore local 8080 --to bore.pub

add webhook to your own github repo, eg: http://bore.pub:<port_number>/webhook

set a secret and add this secret to the .env file:

SECRET=your_secret

restart local server. now, if you create an issue, will notify your local server. if issue meets the game to the conditions, it will be updated to the database when the issue is closed. conditions:

  • operator is repo owner
  • one or more picture
  • a .zip file

reference: #1

use sql

download sql file

psql database_name -U username < games.sql

docker

docker build -t 594mantou/nesbox .
docker push 594mantou/nesbox

deploy prepare

git pull
diesel migration run