メインコンテンツにスキップ

ReactOnAppsScript

這個專案旨在使用Google Apps Script這個(免費)伺服器框架下,進行React網站的開發建置,並以Google Sheet作為簡易型資料庫,Google Drive作為內容儲存庫,讓網頁可以動態呈現並方便管理。

AI Summary

ReactOnAppsScript

Build React sites on GAS using Sheets/Drive

Target Users

Intermediate developers building internal tools or web apps who want to run React on GAS

Problems Solved

Complexity of hosting React on GAS and using Sheets/Drive for data and deployment

Tags

Main Features

1
Run React on GAS

Use Apps Script as a serverless base to publish a React site as a Web App

2
Sheets as simple DB

Provides a setup that uses Google Sheets as a simple database

3
Drive content storage

Assumes using Google Drive as a repository for content storage

4
Deploy via pnpm/clasp

Setup and deployment via pnpm scripts and clasp

5
Docs via blog posts

Related blog posts explain features and configuration

Usage Examples

Public information is insufficient; the README does not include JavaScript usage examples. Below is an excerpt of the setup and deploy steps from the README.

// Install dependencies
pnpm install

// Login to Apps Script
pnpm run login

// Create a new Apps Script project
pnpm run setup

// After publishing the Web App, add deploymentId to dist/.clasp.json
// Deploy a new version
pnpm run deploy

// Open the published version
pnpm run open