Oto is a go driven rpc code generation tool, we are using this to generate the go endpoints and the javascript to use those endpoints.
- Create a database:
touch todos.db
- Install the frontend (svelte):
cd frontend npm install && npm run build
- Run it:
go run main.go
- Navigate in your browser to localhost:8080
# backend
oto -template ./templates/server.go.plush \
-out ./generated/oto.gen.go \
-ignore Ignorer \
-pkg generated \
./definitions/definitions.go &&
gofmt -w ./generated/oto.gen.go ./generated/oto.gen.go
# frontend
oto -template ./templates/client.js.plush \
-out ./frontend/src/oto.gen.js \
-ignore Ignorer \
./definitions/definitions.go