Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mefengl/awsome-indie
Simple tools enable a simple person to make a difference.
https://github.com/mefengl/awsome-indie
Last synced: 10 days ago
JSON representation
Simple tools enable a simple person to make a difference.
- Host: GitHub
- URL: https://github.com/mefengl/awsome-indie
- Owner: mefengl
- License: mit
- Created: 2022-10-24T15:45:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-10T13:17:48.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T10:15:33.371Z (about 2 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Awsome-Indie
Simple tools enable a simple person to make a difference.## Playground
### Python
https://www.online-python.com/### React
https://playcode.io/react## Backend
### localhost
Always host on local computer first (maybe forever), because it's much easier to debug `locally`.
### json-server
json as DB, because... well, it's nice for 12 year old kid, and even better for me.
```bash
# Install DB
npm install -g json-server
# Make DB
echo '{"dbName": ["id":1,"msg":"hello world!"]}' >> db.json
# Run DB
json-server db.json --port:6661
# GET
curl http://localhost:6661/dbName
# POST
# if you use httpie, it will be easier
# and it's also have desktop application, make it much easier when you test `locally`
curl -d "id=2&msg='hi" -X POST http://localhost:6661/dbName
```
it also have `sort`, `limit` etc. option, see https://github.com/typicode/json-server### Caddy
Connect the `https://.com` with `localhost:`, hard to believe it can apply for SSL certificate automatically, like magic.
```bash
# here is homebrew, yes, `locally`, if you use ubuntu,centos... it will be apt-get, dnf, yum...
brew install caddy# now the World Wide Web have such a honor to get access to you json DB
caddy reverse-proxy --from .com --to :6661
```More: https://caddyserver.com/docs/quick-starts/reverse-proxy
### pm2
Caddy is already a system service, so won't shut down when log out. But json-server needs pm2.
```bash
# may need prefix
npm install -g pm2
# pm2 run json-server, first `--` means pass through follow option to json-server rather than pm2
pm2 start json-server -- db.json --port 6661
```## Example
```bash
# under the folder that have public folder, you don't need to have db.json, which will created automaticlly
pm2 --name start json-server -- db.json --port
```
have this in `Caddyfile`
redir / //
handle_path /* {
reverse_proxy :
}