https://github.com/dashersw/tombala
A simple tombola game
https://github.com/dashersw/tombala
Last synced: 12 months ago
JSON representation
A simple tombola game
- Host: GitHub
- URL: https://github.com/dashersw/tombala
- Owner: dashersw
- License: mit
- Created: 2022-12-30T23:51:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-07T20:13:01.000Z (almost 3 years ago)
- Last Synced: 2025-04-05T16:41:15.416Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 960 KB
- Stars: 28
- Watchers: 4
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stack
A starter repository for MongoDB, Node.js, and Vue.js, with a local environment based on Docker.
# Installation
## Running the stack
```sh
$ docker-compose up
```
## Accessing the stack from a browser
The starter stack works with a load balancer that binds to ports 80 and 443. It currently serves the domain http://stack.localhost. In order to reach the frontend through the stack, you need to edit your `hosts` file (usually under `/etc/hosts` in UNIX environments and `C:\Windows\System32\Drivers\etc\hosts` in Windows) and add the following line:
```
127.0.0.1 stack.localhost
```
Now if you visit http://stack.localhost, you will be greeted with the frontend starter project.
## Changing the local domain
If you wish to use a domain name other than http://stack.localhost, simply set the environment variable `DOMAIN` to any domain you want.
```sh
$ DOMAIN=another-domain.localhost docker-compose up
```
You then also need to update your `hosts` file accordingly.
## Debugging
You can debug the backend while it's running in VSCode. Instead of running `docker-compose up`, run the following command:
```sh
$ docker-compose -f docker-compose.yml -f docker-compose.debug.yml up
```
This starts the backend service in the debug mode, so you can use the built-in debug task `Attach to backend` to debug your backend service.
# Running tests
## Running backend tests
```sh
$ cd backend
$ npm i
$ npm test
```
## Running frontend tests
```sh
$ cd frontend
$ npm i
$ npm test:unit
$ npm test:e2e
```
# Linting
Run `npm install` on the root folder and it will set up a pre-commit hook to lint the staged files. You will also have two lint commands, `npm run lint` and `npm run lint-staged` that you can run on the root folder.
These commands run the individual `lint` and `lint-staged` scripts in both the `frontend` and the `backend` folders, and they will respect individual configurations of these folders.
# License
MIT License
Copyright (c) 2020 Coyotiv®
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.