This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from eukarya-inc/refactor-by-test
Refactoring by adding tests
- Loading branch information
Showing
12 changed files
with
9,666 additions
and
4,345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
Oops, something went wrong.