Skip to content

Commit

Permalink
feature: gateway
Browse files Browse the repository at this point in the history
Implements Latitude API Gateway using Hono with the nodejs adapter
  • Loading branch information
geclos committed Jul 31, 2024
1 parent 7680ee0 commit 62f6feb
Show file tree
Hide file tree
Showing 35 changed files with 1,816 additions and 227 deletions.
6 changes: 6 additions & 0 deletions apps/gateway/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["./node_modules/@latitude-data/eslint-config/library.js"],
"env": {
"node": true
}
}
33 changes: 33 additions & 0 deletions apps/gateway/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# prod
dist/

# dev
.yarn/
!.yarn/releases
.vscode/*
!.vscode/launch.json
!.vscode/*.code-snippets
.idea/workspace.xml
.idea/usage.statistics.xml
.idea/shelf

# deps
node_modules/
.wrangler

# env
.env
.env.production
.dev.vars

# logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# misc
.DS_Store
8 changes: 8 additions & 0 deletions apps/gateway/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```
npm install
npm run dev
```

```
npm run deploy
```
30 changes: 30 additions & 0 deletions apps/gateway/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "@latitude-data/gateway",
"type": "module",
"scripts": {
"build": "tsc --build tsconfig.prod.json --verbose",
"dev": "tsx watch src",
"lint": "eslint src/",
"prettier": "prettier --write \"**/*.{ts,tsx,md}\"",
"start": "node -r module-alias/register ./dist --env=production",
"tc": "tsc --noEmit",
"test": "vitest --run",
"test:watch": "vitest"
},
"dependencies": {
"@hono/node-server": "^1.12.0",
"@latitude-data/core": "workspace:^",
"@latitude-data/env": "workspace:^",
"hono": "^4.5.3"
},
"devDependencies": {
"@latitude-data/eslint-config": "workspace:^",
"@latitude-data/typescript-config": "workspace:^",
"eslint": "8",
"jet-paths": "^1.0.6",
"tsx": "^4.16.2",
"typescript": "^5.5.4",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^2.0.4"
}
}
Loading

0 comments on commit 62f6feb

Please sign in to comment.