Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser endpoint #1

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./node_modules
22 changes: 22 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-var-requires": 0,
"jsx-a11y/anchor-is-valid": 0,
"no-mixed-operators": 0,
"no-restricted-globals": 0,
"semi": [1, "never"]
},
"ignorePatterns": ["**/node_modules/**"]
}
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
# podverse-serverless

## Developing Podverse modules

Podverse maintains several different modules which are imported across apps. Please read [Developing Podverse modules](https://github.com/podverse/podverse-ops/blob/master/docs/how-to-develop-podverse-modules.md) for a workflow you can use to make code changes to this module locally.

## Local dev

```sh
npm run dev
yarn dev
```

or

```sh
yarn dev:watch
```

Should spin up a server on port 3030, making a request to http://localhost:3030/api/hello should respond

## Build

```sh
npm install && npm run build
yarn && yarn build
```

## Upload to S3
Expand Down
15 changes: 15 additions & 0 deletions esbuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env node

require("esbuild")
.build({
logLevel: "info",
entryPoints: ["src/index.ts"],
bundle: true,
outfile: "dist/index.js",
minify: true,
sourcemap: true,
platform: 'node',
target: 'es2020',
external: ['sharp', 'pg-native']
})
.catch(() => process.exit(1))
6 changes: 6 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ext": "ts",
"env": {
"NODE_ENV": "development"
}
}
Loading