This is the API server for scREAD. Ther server builds on top of Koa.js and connects to a MYSQL database. The server is developed by Bioinformatics and Mathematical Biosciences Lab (BMBL)
You can directly use the scREAD backend api service from a public URL: https://bmbls.bmi.osumc.edu/api/scread.
# List all datasets
https://bmbls.bmi.osumc.edu/api/scread/dataset
# Search differentially expressed genes, e.g. GAD1 gene.
https://bmbls.bmi.osumc.edu/api/scread/de/gene/gad1
git clone https://github.com/OSU-BMBL/scread-backend.git
cd scread-backend
npm install
create a .env
file and set the koa.js port, database username & password:
DB_USER=XXXX
DB_PASSWORD=YYYY
DB_URL=ZZZZ
PORT=8889
We use Sequelize
to connect out MYSQL database, first export MYSQL table structure using sequelize-auto
:
npm install -g sequelize-auto
npm install -g mysql
After installed [sequelize-auto
] and [mysql
],enter [./server
] folder, run the following command:
sequelize-auto -o "./schema/scread" -d scread -h 127.0.0.1 -u root -p 3306 -x YOUR_PASSWORD -e mysql
Beacuse of using Koa2, Node.js >= v7.6.0
is needed.
npm run dev
&& npm run server
open browser: localhost:8889
Prerequisite: install PM2
Start the production server in PM2:
npm run serve
open browser: localhost:8890