Api service for the Smartwaiter app frontends based on GraphQL. Authorization method works using JWT (https://jwt.io/). For frontend users the validation includes a check with Facebook login
- For the frontends refer to the following repositories
https://github.com/edgarcheverier/smartwaiter-customer
https://github.com/lars-berger/smartwaiter-rms
A few things you have to take in consideration before using Smartwaiter Backend
After cloning the repo you'll have to:
9c19a414c738d236310463edbccb9fc8ee1b8111
- Install Mysql on your machine and run the service (macOS):
brew info mysql
brew tap homebrew/services
brew services start mysql
For Windows installation refer to: https://dev.mysql.com/downloads/windows/installer/8.0.html
For Linux installation refer to: https://dev.mysql.com/doc/refman/8.0/en/linux-installation.html
- Change your Msyql user password:
mysqladmin -u username password 'yourpassword'
- Access Mysql and create the needed databases:
mysql -u username -pyourpassword
- Create developing database:
mysql> CREATE DATABASE smartwaiter_develop;
- Create testing database:
mysql> CREATE DATABASE smartwaiter_testing;
-
Facebook app For using the Facebook login in the Frontend you will need to create a Facebook App https://developers.facebook.com/docs/apps/
-
Setup .env file: For development the .env file only has the configuration of the Facebook App.
FACEBOOK_APP_ID=<facebook-app-id>
FACEBOOK_API_VERSION=v3.0
After cloning the repository install npm packages and start the server:
cd smartwaiter-server
npm install
npm run dev
- GraphQL You can access the GraphQL playground to do querys and mutations through the following link while running the project http://localhost:4001/explore
This project is licensed under the MIT License - see the LICENSE.md file for details