References
# init app
bootapp -l node -u moondevnode -n learn-pocketbase-youtube-consulting_ninja-ts -d "Svelte Kit with Picocss(Web Start)" -t svelte-kit-pocketbase-ts
yarn dev --open
cd C:/JnJ-soft/Developments/Database/sqlite
pocketbase serve --dir="./pb-consullting_ninja" --http="127.0.0.1:8090"
# result
Server started at http://127.0.0.1:8090
➜ REST API: http://127.0.0.1:8090/api/
➜ Admin UI: http://127.0.0.1:8090/_/
http://127.0.0.1:8090/_/
Admin sign in
[email protected]
=====
http://127.0.0.1:8090/_/
collection:
jobs
fields
sample record
.env
src/lib/Navbar.svelte
src/+layout.svelte
,scr/+page.svelte
src/routes/create/+page.svelte
,src/routes/create/+page.server.ts
src/routes/read/+page.svelte
,src/routes/read/+page.server.ts
src/routes/update/+page.svelte
,src/routes/update/+page.server.ts
src/routes/destroy/+page.svelte
,src/routes/destroy/+page.server.ts
=====
MoonPocketBase
moonpocketbase
User Type: External
> CREATE
App information
svelte-pocketbase
[email protected]
App logo
SAVE AND CONTINUE
ADD OR REMOVE SCOPES
SAVE AND CONTINUE
+ ADD USERS
SAVE AND CONTINUE
Google Cloud >
Credential
(좌측 메뉴) 클릭 >+ CREATE CREDENTIALS
OAuth client ID
(상단 select 메뉴)
Application type: Web application
Name: Svelte-Pocketbase
Authorized JavaScript origins
+ ADD URI
http://localhost:5173
Authorized redirect URIs
+ ADD URI
http://localhost:5173/oauth
CREATE
클릭
Your Client ID
(popup) Copy =>pocketbase settings
,.env
Your Client Secret
(popup) Copy =>pocketbase settings
,.env
http://127.0.0.1:8090/_/
Settings 버튼(좌측 최하단 Settings 아이콘) 클릭 >
Authentication
>Auth providers
Google >
Google provider
Enable
Your Client ID
(popup) Copy => Paste toGoogle provider > Client ID
Your Client Secret
(popup) Copy => Paste toGoogle provider > Client Secret
Save changes
버튼 클릭
.env
SECRET_GOOGLE_CLIENT_ID=
SECRET_GOOGLE_CLIENT_SECRET=
pocketbase.bat
src/hooks.server.ts
src/routes/signup/+page.svelte
,src/routes/signup/+page.server.ts
src/routes/oauth/+server.ts
src/routes/+page.svelte
,src/routes/+layout.svelte
cd C:\MoonDev\withTool\inPocketBase\learning\Youtube\ConsultingNinja\learn-pocketbase-youtube-consulting_ninja-ts
pocketbase.bat
cd C:\MoonDev\withTool\inPocketBase\learning\Youtube\ConsultingNinja\learn-pocketbase-youtube-consulting_ninja-ts
yarn dev --open
http://localhost:5173/signup