Central Authentication Service for Delfruit, IWM, and other fangame community services!
- Go Get the repository from the /src/api directory or clone the repository and install libraries manually.
- Install MariaDB (MySQL may work, but the last time it was tested it failed).
- Databases aren't created or auto-migrate yet, so you'll have to do
create database gatejump
in MariaDB/MySQL for now. - We use Task as the current Build System, install it.
- The build environment currently requires GNU Date and Git to be present on the system. So if it currently doesn't, fix that before continuing.
- Install fileb0x via
go get -i github.com/UnnoTed/fileb0x
- Install a SMTP Server, for the purposes of testing we will be using a sink called Inbucket, but you can use whatever one you like.
- Install mkcert via
go get -i github.com/FiloSottile/mkcert
. We'll need this for having STARTTLS on the SMTP Server. If you aren't using Inbucket or have a proper SMTP Server with STARTTLS, you may skip this. - Build the API server by running
task build
in project root. - Create a file and appropriately name the following information under
~/config/config.json
{
"host":"0.0.0.0",
"port":"80",
"sslPort":"443",
"database":{
"username":"root",
"password":"",
"dsn":"gatejump"
},
"https":{
"certFile":"",
"keyFile":""
},
"mailer":{
"host":"localhost",
"port":"2500",
"user":"gatejump@inbucket",
"pass":""
},
"superuser":{
"password": "password"
}
}
- Run
mkcert cert
and rename the resulting filescert.pem
tocert.crt
andcert-key.pem
tocert.key
and place them with in the root tree next to the Inbucket binary. - Run Inbucket with
INBUCKET_SMTP_TLSENABLED=true ./inbucket -netdebug
- Run
./api
- Verify the service is running by going to
localhost:80/
- Install Node.js from
https://nodejs.org/en/
- Run in the root directory
npm install
- Run in the root directory
npm start