Skip to content

Commit 87e1890

Browse files
authored
docs: use tables for formatting and add a list of used libraries
1 parent 9b43f71 commit 87e1890

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

README.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,16 @@ Generates the endpoints (or a whole app) from a mapping (SQL query -> URL)
4343
```
4444
Note that the queries use a little unusual named parameters: `:b.name`, `:p.categoryId`, etc The prefixes `b` (body) and `p` (path) are used here in order to bind to parameters from the appropriate sources. The prefixes are needed only during code generation and they will absent from the resulted code.
4545

46-
1. Generate code
47-
```console
48-
$ npx query2app
49-
```
50-
An example of generated code can be inspect at [examples/js](examples/js) directory.
46+
1. Generate code
47+
| Language | Command for code generation | Example of generated files | Libraries |
48+
| -----------| ----------------------------| ---------------------------| --------- |
49+
| 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) |
5150

5251
1. Run the application
53-
```console
54-
$ npm install
55-
$ export DB_NAME=my-db DB_USER=my-user DB_PASSWORD=my-password
56-
$ npm start
57-
```
52+
| Language | Commands to run the application |
53+
| -----------| --------------------------------|
54+
| JavaScript | <pre>$ npm install<br/>$ export DB_NAME=my-db DB_USER=my-user DB_PASSWORD=my-password<br/>$ npm start</pre> |
55+
5856
---
5957
:bulb: **NOTE**
6058

0 commit comments

Comments
 (0)