Skip to content

Commit

Permalink
Fix gateway 2
Browse files Browse the repository at this point in the history
  • Loading branch information
loicknuchel committed Jun 19, 2024
1 parent 891e1a1 commit eef3ff3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
10 changes: 9 additions & 1 deletion gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ Small Node server to proxy database connections and enable browsers to access da

The other way is to use the [desktop app](../desktop) for this, keeping everything local and accessing local databases.


## Set Up

- copy `.env.example` to `.env` and adapt values
- run `pnpm install` to install dependencies
- start dev server with `pnpm start`


## Env vars

Loaded from `.env` file, with schema validation


## Backend API Development

There are a number of handy commands you can run to help with development.
Expand All @@ -28,14 +31,18 @@ There are a number of handy commands you can run to help with development.
| `pnpm run lint` | Run eslint |
| `pnpm run lint:fix` | Run eslint in fix mode |


## CI

Run tests on push/PR to `main` branch
Check `.github/workflows/CI.yml`


## Deploy

Digital Ocean uses the `package-lock.json` to deploy, to generate it use `npm i --package-lock-only`, but needs to replace the `workspace:^` values by real versions :/
Digital Ocean uses the `package-lock.json` to deploy, to generate it use `npm i --package-lock-only`.
The `workspace:^` can't be used there...


## Publish

Expand All @@ -46,6 +53,7 @@ Digital Ocean uses the `package-lock.json` to deploy, to generate it use `npm i

View it on [npm](https://www.npmjs.com/package/@azimutt/gateway).


## Dev

If you need to develop on multiple libs at the same time (ex: want to update a connector and try it through the CLI), depend on local libs but publish & revert before commit.
Expand Down
20 changes: 10 additions & 10 deletions gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
"dry-publish": "pnpm run build && pnpm test && pnpm pack"
},
"dependencies": {
"@azimutt/connector-bigquery": "workspace:^",
"@azimutt/connector-couchbase": "workspace:^",
"@azimutt/connector-mariadb": "workspace:^",
"@azimutt/connector-mongodb": "workspace:^",
"@azimutt/connector-mysql": "workspace:^",
"@azimutt/connector-postgres": "workspace:^",
"@azimutt/connector-snowflake": "workspace:^",
"@azimutt/connector-sqlserver": "workspace:^",
"@azimutt/models": "workspace:^",
"@azimutt/utils": "workspace:^",
"@azimutt/connector-bigquery": "^0.1.1",
"@azimutt/connector-couchbase": "^0.1.1",
"@azimutt/connector-mariadb": "^0.1.1",
"@azimutt/connector-mongodb": "^0.1.1",
"@azimutt/connector-mysql": "^0.1.2",
"@azimutt/connector-postgres": "^0.1.6",
"@azimutt/connector-snowflake": "^0.1.1",
"@azimutt/connector-sqlserver": "^0.1.1",
"@azimutt/models": "^0.1.8",
"@azimutt/utils": "^0.1.3",
"@fastify/cors": "8.2.1",
"@sinclair/typebox": "0.28.10",
"ajv": "8.12.0",
Expand Down

0 comments on commit eef3ff3

Please sign in to comment.