Git Product home page Git Product logo

wasemul's Introduction

wasemul

Sharing everything about games!

Development

From scratch, use the following commands to build and run the docker-compose containers.

Don't forget to add the database name, user and password to the environment variables of the db container (in docker-compose-dev.yml). Do not forget to also add them to back/.env so that the backend app can connect to the database.

./npm_install.sh # Installs node_modules required for development
docker-compose -f docker-compose-dev.yml build
docker-compose -f docker-compose-dev.yml up

These commands will expose the API from the back repo on port 3002, and the GUI from the front repo on port 3000.

Once the containers are running, seed the database by accessing route /seed of the back repo (through any web browser). The URL will typically be http://localhost:3002/seed.

The back is run with nodemon, so any changes you make should be reflected in real time.

Running the test suites

Test suites are run automatically when committing with git.

To run the test suites manually :

  • for the back repo, go to the back/ directory and run:

    npm test && npm run test-format
  • for the front repo, go to the front/ directory and run:

    CI=true npm test && npm run test-format

Production deployment

The service is currently available at wasemul.viarezo.fr.

wasemul's People

Contributors

atauveron avatar djou-ecp avatar enizor avatar kserrania avatar ovheurdrive avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wasemul's Issues

Number of rounds for hashing passwords should not be hard-coded

The number of rounds for hashing passwords (using bcrypt) is currently hard-coded in file back/src/auth.js, through variable saltRounds. The current value (10 rounds) is unsuitable for production use.

  • Set the number of rounds through an environment variable.
  • Use a sufficiently high value (at least 1000) in a production environment. 10 rounds are fine for development.

`/users/:id` route returns all user data

When querying the /users/:id route (on the API), the returned JSON by default contains all user data (including hashed password, account activation status, etc).

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.