Skip to content

hackersjail/mugensweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MugenSweeper

Netlify Status Build Status Coverage Status Node.js Version License

Code style Prettier Tested with Jest CircleCI Codecov

Play MugenSweeper

https://mugensweeper.netlify.com

API Server

https://mugensweeper-api.ireversi.io/docs/v1/

Development

Node.js version 10.13.0 or higher is required.

Installation

Install dependencies.

$ npm install # Or yarn

Usage

Develop MugenSweeper.

# all
$ npm run dev # Or yarn dev

# API server only
$ npm run dev:api # Or yarn dev:api

# Client only
$ npm run dev:client # Or yarn dev:client

Testing scripts.

# Manual
$ npm test # Or yarn test

# Automatic
$ npm run test:watch # Or yarn test:watch

# Report test coverage
$ npm run test:coverage # Or yarn test:coverage

Database

MugenSweeper depends on MongoDB.
Please prepare MongoDB for development.

Environment Variables

MugenSweeper is using dotenv.
To set environment variables, create an .env file.

MongoDB

Default: mongodb://localhost:27017/mugensweeper

# Example (Using MongoDB Atlas)
MONGO_URI=mongodb://<username>:<password>@cluster0-shard-00-00-iuxvg.mongodb.net:27017...

Docker Compose

Build a development environment using Docker Compose.

# Starts the containers in the background and leaves them running
$ docker-compose up --detach

# Get an interactive prompt
$ docker-compose exec dev sh

# Start development
/usr/src/app # yarn dev

For Windows

Set Docker Machine's IP to .env file with HOST variable.

rem Get the IP address of a machine command
> docker-machine ip
# Example `.env` file
HOST=192.168.99.100

Windows uses polling for hot reloading. Please note using another commands in Docker container.

# Developing
/usr/src/app # yarn docker:dev

# Testing
/usr/src/app # yarn docker:test

Releases

No releases published

Packages

No packages published

Languages