Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from eukarya-inc/refactor-by-test
Browse files Browse the repository at this point in the history
Refactoring by adding tests
  • Loading branch information
tomoyane authored Mar 22, 2024
2 parents 8cd7ffb + 0a233f3 commit 5850e2c
Show file tree
Hide file tree
Showing 12 changed files with 9,666 additions and 4,345 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
- name: Dependencies
run: npm ci

- name: Build
run: npm install -g pkg && npm run build
- name: Test and Build
run: npm install -g pkg && npm test && npm run build
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
## Notion proxy

Notion proxy for public page
Deliver notion pages via your domain.
Reference [fruitionsite](https://github.com/stephenou/fruitionsite) for rewrite html processing.
This proxy does not depend on Cloudflare and launches on express server.

### Node Version

18

### Environment variable

| Env | Description | Default |
|-------------------|-----------------------------------------------------------------|----------------------------------|
| PAGE_TITLE | Page title | "" |
| PAGE_DESC | Page desc | "" |
| GOOGLE_FONT | See: `https://developers.google.com/fonts/docs/getting_started` | "" |
| PROXY_PORT | Proxy port number | 3456 |
| DOMAIN | Proxy domain for rewrite | localhost:3456 |
| IS_TLS | Proxy tls | false |
| NOTION_PAGE_ID | Notion public page id | f1db0cfbe246475784c67f279289abea |
| CUSTOM_SCRIPT | Custom script | "" |
| CONTENT_CACHE_SEC | Cache time for loaded content (sec) | 300 |

### Reference for rewrite html processing

Reference: https://github.com/stephenou/fruitionsite
| Env | Description | Default |
|-------------------|--------------------------------------------|----------------------------------|
| PAGE_TITLE | Page title on meta tag | "" |
| PAGE_DESC | Page desc on meta tag | "" |
| GOOGLE_FONT | See: `https://developers.google.com/fonts` | "" |
| PROXY_PORT | Proxy port number | 3456 |
| DOMAIN | Proxy domain for rewrite | localhost:3456 |
| IS_TLS | Proxy tls(http/https) for rewrite | false |
| NOTION_PAGE_ID | Notion public page id | f1db0cfbe246475784c67f279289abea |
| CUSTOM_SCRIPT | Custom script | "" |
| CONTENT_CACHE_SEC | Cache time for loaded content (sec) | 300 |

### Getting started

Start proxy for debug on local.

```bash
$ npm ci
$ npm test
$ npm start_proxy
> [email protected] start
> node src/index.js
Expand Down
Loading

0 comments on commit 5850e2c

Please sign in to comment.