Could you please give more detail about how to host my own application for private Notion pages?
LeeJunHyun opened this issue · 4 comments
Thanks for sharing this nice work and react-notion as well.
I'm trying to host it using Cloudflare, but it is a little bit difficult for me because I don't have an experience with it.
Could you please give me some information about how to host it?
@LeeJunHyun Any update on this? You managed to make it work?
Even I'm looking for the same
@Harshmakadia check out https://www.npmjs.com/package/react-notion-x and https://github.com/transitive-bullshit/nextjs-notion-starter-kit which should make what you're looking for a lot easier.
@LeeJunHyun Any update on this? You managed to make it work?
Even I'm looking for the same
- Download / Clone / or Folk this repo to your computer.
- Run
npm i @cloudflare/wrangler -g
orsudo npm i @cloudflare/wrangler -g
- Run
wrangler config
. This is will ask you the Cloudflare API Token. Come to your Cloudflare API Token Page (https://dash.cloudflare.com/profile/api-tokens) and create token (only with Workers). Copy it and paste to your terminal, Enter. - Go to file
wrangler.example.toml
and rename towrangler.toml
- Also in
wrangler.toml
, you need to add value foraccount_id
andzone_id
(2 things you can find in your domain on Cloudflare). Add value forroute
(subdomain you want to use, example: sub.sample.com). And also remove the lineworkers_dev = true
because this line will send you an error like this [you must set workers_dev = true OR provide a zone_id and route/routes.] - After edit
wrangler.toml
, open your terminal in the same folder, runwrangler publish
. And it will run to push your files to Cloudflare Workers. - Go to your Cloudflare, Domain you have choosen (the domain you use
account_id
andzone_id
. Create A with value is sub (subdomain you use) and point to 1.1.1.1 with Cloudflare Gates (Orange Cloud). - Enjoy it.
Thanks for sharing this nice work and react-notion as well.
I'm trying to host it using Cloudflare, but it is a little bit difficult for me because I don't have an experience with it.
Could you please give me some information about how to host it?
CC you as well. Thank you.