Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruhyadi/be-suwit
Backend of rock-paper-scissors project
https://github.com/ruhyadi/be-suwit
Last synced: about 10 hours ago
JSON representation
Backend of rock-paper-scissors project
- Host: GitHub
- URL: https://github.com/ruhyadi/be-suwit
- Owner: ruhyadi
- Created: 2024-09-06T15:29:27.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T12:52:39.000Z (4 months ago)
- Last Synced: 2024-11-08T20:51:04.145Z (about 2 months ago)
- Language: TypeScript
- Size: 135 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Suwit Backend Service
## Introduction
Suwit is a simple game that is played by one player against the computer. The player and the computer will choose one of the three options: rock, paper, or scissors. The winner is determined by the rules: rock beats scissors, scissors beats paper, and paper beats rock.
## Getting Started
### Prerequisites
We are using [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) for development. You need to have [Docker](https://docs.docker.com/engine/install/) and [Visual Studio Code](https://code.visualstudio.com/) installed on your machine. Also, you need to install the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) in Visual Studio Code.
### Development
1. Clone the repository and open it in Visual Studio Code
```bash
git clone https://github.com/ruhyadi/be-suwitcd be-suwit
code .
```2. Create docker network
```bash
docker network create be-suwit-network
```3. Start the PostgreSQL database
```bash
make start_db
```4. Open in the devcontainer
```bash
# Press F1 and select Remote-Containers: Reopen in Container
```5. Install dependencies
```bash
npm install
```6. Create/update the `.env` file
```bash
cp .env.example .env
```7. Start the development server
```bash
npm run start:dev
```The server will be running on `{DOMAIN}:{PORT}` (ex. `http://localhost:3000`) and the Swagger documentation will be available at `{DOMAIN}:{PORT}/api/docs` (ex. `http://localhost:3000/api/docs`).
## Acknowledgements
- [NestJS](https://nestjs.com/): A progressive Node.js framework for building efficient, reliable, and scalable server-side applications.
- [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers): A development container is a running Docker container with a well-defined tool/runtime stack and its prerequisites.