Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jarv/cmdchallenge
This repo is mirror of https://gitlab.com/jarv/cmdchallenge
https://github.com/jarv/cmdchallenge
Last synced: 5 days ago
JSON representation
This repo is mirror of https://gitlab.com/jarv/cmdchallenge
- Host: GitHub
- URL: https://github.com/jarv/cmdchallenge
- Owner: jarv
- License: mit
- Created: 2017-01-16T20:40:46.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-27T21:21:02.000Z (12 months ago)
- Last Synced: 2024-08-02T12:48:59.788Z (3 months ago)
- Language: Go
- Homepage: https://about.cmdchallenge.com
- Size: 60.1 MB
- Stars: 720
- Watchers: 29
- Forks: 74
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - jarv/cmdchallenge - This repo is mirror of https://gitlab.com/jarv/cmdchallenge (others)
README
# CMD Challenge
This repository contains the code for the site [cmdchallenge.com](https://cmdchallenge.com)
[Read more about cmdchallenge](https://jarv.org/tags/cmdchallenge/)
## Installation
- [Install Docker](https://docs.docker.com/get-docker/)
- [Install rtx](https://github.com/jdxcode/rtx#quickstart)
- `rtx install````
docker-compose build
# For ARM (M1 mac for example) run
# BUILD_ARCH=arm64 docker-compose builddocker-compose up runcmd --remove-orphans
# For ARM (M1 mac for example) run
# BUILD_ARCH=arm64 docker-compose up runcmd caddy -V --remove-orphans# Connect your browser to http://localhost:8181/
```- Connect your browser to http://localhost:8100
## Testing
- `cd cmdchallenge && go test ./...`
## Local development
### Static assets
```
cd site
npm install
npx vite build
```### Run the server
```
cd cmdchallenge
# Start the backend the `-dev` option uses an in-memory db.
go run cmd/runcmd/runcmd.go -dev -staticDistDir=../site/dist
```## Misc
**Test a single command:**
```
curl http://localhost:8181/c/r -X POST -F slug=hello_world -F cmd="echo hello world"
```**Fetch solutions:**
```
curl http://localhost:8181/c/s?slug=hello_world
```## Bugs / Suggestions
- Open [a GitHub issue](https://github.com/jarv/cmdchallenge/-/issues).