Skip to content

Commit 8461f96

Browse files
authored
docs(golang): add instructions for generating/running Golang app
Part of #9
1 parent 87e1890 commit 8461f96

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ Generates the endpoints (or a whole app) from a mapping (SQL query -> URL)
4747
| Language | Command for code generation | Example of generated files | Libraries |
4848
| -----------| ----------------------------| ---------------------------| --------- |
4949
| JavaScript | `npx query2app --lang js` | [`app.js`](examples/js/app.js)<br/>[`routes.js`](examples/js/routes.js)<br/>[`package.json`](examples/js/package.json) | Web: [`express`](https://www.npmjs.com/package/express), [`body-parser`](https://www.npmjs.com/package/body-parser)<br>Database: [`mysql`](https://www.npmjs.com/package/mysql) |
50+
| Golang | `npx query2app --lang go` | [`app.go`](examples/go/app.go)<br/>[`routes.go`](examples/go/routes.go)<br/>[`go.mod`](examples/go/go.mod) | Web: [`go-chi/chi`](https://github.com/go-chi/chi)<br/>Database: [`go-sql-driver/mysql`](https://github.com/go-sql-driver/mysql), [`jmoiron/sqlx`](https://github.com/jmoiron/sqlx) |
5051

5152
1. Run the application
5253
| Language | Commands to run the application |
5354
| -----------| --------------------------------|
5455
| JavaScript | <pre>$ npm install<br/>$ export DB_NAME=my-db DB_USER=my-user DB_PASSWORD=my-password<br/>$ npm start</pre> |
56+
| Golang | <pre>$ go run *.go</pre>or<pre>$ go build -o app<br/>$ ./app</pre> |
5557

5658
---
5759
:bulb: **NOTE**

0 commit comments

Comments
 (0)