https://github.com/phase/omgos
HTTP Server with a command+file architecture for embedded languages or anything else you can run in a shell
https://github.com/phase/omgos
Last synced: 12 months ago
JSON representation
HTTP Server with a command+file architecture for embedded languages or anything else you can run in a shell
- Host: GitHub
- URL: https://github.com/phase/omgos
- Owner: phase
- Created: 2016-05-17T00:08:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-17T04:45:36.000Z (almost 10 years ago)
- Last Synced: 2025-01-24T22:31:38.268Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# omgos
`omgos` is a small HTTP Server used for running commands for certain files
types.
If your `commands.json` contains:
```json
{
"py": "python $file"
}
```
Then accessing `server:80/hello.py` will run `python hello.py` and the output
will be sent to the client.
## config.json
`omgos` can be configured with a local `config.json`.
* `blocked`: Requests matching any files in the array will return a _403 Forbidden_.
```
"blocked": ["config.json", "commands.json", "src/(.*)"]
```
This blocks `config.json`, `commands.json`, and anything in the `src` folder. Full regex is supported.
## pygos
Included in this repository is a Python embedder called `pygos`. This will
read a file and run any Python code within `<% %>`.
```python
Awesome stuff
Python Version:
<%
import sys
print(sys.version,end='')
%>
```
This will output the Python version as well as the surrounding HTML.