SocketPO is a JokenPo (Rock, Paper, Scissors) game made with NodeJS, GraphQL and React for study and fun.
Had a cool idea? Please open an Issue and let's talk!
- Node 10.9.0+
- NPM 6.4.1
First of all you will need to create a .env
file on the root folder, with a required configs:
- MONGODB_URI={URI from a mongodb} (I am using MLab for local development)
- NODE_ENV=
DEVELOPMENT
Installation
- Run
npm install
on root folder - Run
npm install
on/client
folder
Npm scripts:
command | description |
---|---|
npm run dev | start local both client at localhost:3000 and the server at localhost:3001 (GraphQL Playground at http://localhost:3001/graphql) |
npm run dev:server | start local server at localhost:3001 (GraphQL Playground at http://localhost:3001/graphql) |
npm run dev:client | start local client at localhost:3000 |
Server-side tests are made with Jest and supertest to request the GraphQL endpoint and run some queries/mutations. (local mongodb)
Npm scripts:
command | description |
---|---|
npm test | run all server tests without a watch mode |
npm run test:client | run all the client side tests and build |
Client-side tests are made with Jest and Enzyme
Npm scripts:
command | description |
---|---|
npm test | run all client tests with a watch mode |
npm run test:coverage | run all client tests and extract coverage reports |
Server start on Heroku, and Client (React) build run after with a heroku-postbuild
On client/
folder:
command | description |
---|---|
npm run build | serve files into /build folder |
Both Server-side and Client-side are hosted at Heroku.
Deploy and build process are run automatically after the CI checks on branch master
.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE.md file for details
This RADME doc is highly inspired by this one
Thank You My King 💚