A GraphQL server that works with Klon-Client to mimic features of Reddit.
Clone the project
$ git clone https://github.com/Awkk/klon-server.git
Install all dependencies
$ npm install
Create file .env
in root directory
and set up enviornment variables below:
-
PORT
port for the server to run on
-
DATABASE_URL
Database url to connect. Database used for storing all data.
-
REDIS_URL
Redis url to connect. Redis used for session based authentication.
-
SESSION_SECRET
Session secret for user authentication.
-
CORS_ORIGIN
The url for the front end.
-
SSL_PASSPHASE
Optional. Not needed when running in production enviornment. SSL passphase for the self-signed certificate.
Build the project
$ npm run build
Then run it
$ npm run start