Giter Site home page Giter Site logo

trentschnee / socketpo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gfpaiva/socketpo

1.0 1.0 0.0 8.02 MB

:video_game: JokenPo (Rock, Paper, Scissors) game

Home Page: https://socketpo.herokuapp.com

License: MIT License

JavaScript 89.48% HTML 3.54% CSS 6.98%

socketpo's Introduction

โœŠ ๐Ÿคš โœŒ๏ธ SOCKETPO โœŠ ๐Ÿคš โœŒ๏ธ

Build Status Coverage Status StackShare

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!

โš™๏ธ Requires

  • Node 10.9.0+
  • NPM 6.4.1

๐Ÿƒ๐Ÿฝโ€โ™‚๏ธ Running locally

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

โœ”๏ธ Checks

  • TravisCI checks both server and client tests and build
  • Coveralls check the coverage of client tests

๐Ÿ” Testing

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

๐Ÿ“ฆ Build

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

๐Ÿš€ Deploy

Both Server-side and Client-side are hosted at Heroku. Deploy and build process are run automatically after the CI checks on branch master.

๐Ÿ‘จโ€๐Ÿ’ป Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

โš–๏ธ License

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 ๐Ÿ’š

socketpo's People

Contributors

gfpaiva avatar dependabot[bot] avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.