https://mugensweeper.netlify.com
https://mugensweeper-api.ireversi.io/docs/v1/
Node.js version 10.13.0 or higher is required.
Install dependencies.
$ npm install # Or yarn
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
MugenSweeper depends on MongoDB.
Please prepare MongoDB for development.
-
Download
MongoDB Download Center -
Docker Compose
# Start with MongoDB container only $ docker-compose up --detach mongo
MugenSweeper is using dotenv.
To set environment variables, create an .env
file.
Default: mongodb://localhost:27017/mugensweeper
# Example (Using MongoDB Atlas)
MONGO_URI=mongodb://<username>:<password>@cluster0-shard-00-00-iuxvg.mongodb.net:27017...
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
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