This is the server of Jagg books.
You will need the following things properly installed on your computer.
- Git
- NVM
- Node v12.18.2
- NPM 6.14.5
- MySQL Server
- In order to install NVM use this command
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
-
Close and reopen your terminal.
-
Install the right version of node
nvm install v12
-
Select the version you installed
nvm use v12
- Clone this project
git clone https://github.com/fabiobazurto/aps-jagg-server.git
cd aps-jagg-server
npm install
- create a file called .env and edit with your database credentials
NODE_ENV=DEVELOPMENT
DB_HOST=localhost
DB_USERNAME=<YOUR-DATABASE-USER>
DB_PASSWORD=<YOUR-PASSWORD-USER>
DB_NAME=<YOUR-DATABASE>
JWT_SECRET=somereallylongsecretkey
- Install the ORM
npm install -g sequelize-cli
- Restore database schema
sequelize-cli db:create
sequelize-cli db:migrate
sequelize-cli db:seed:all
node server.js
- Visit your graphql server at http://localhost:4000.