logo
9
2
Login
docs: 更新文档链接

Node + React + COS

badge badge badge

In this example, you will use Cloud Native Build to package the "react-cos-demo" project, build it and upload the artifacts to COS (Tencent Cloud Object Storage).

Prerequisites

  1. Use Cloud Native Build (CNB) to build your project
  2. Environment variables and their usage: Environment Variables
  3. Declarative build cache
  4. Plugins and their usage: Plugin Market
  5. Use coscli plugin: With the coscli plugin, users can perform batch operations like upload, download, and delete on objects through simple command-line instructions

Configuration Secrets

# react_cos_secret.yml COS_SECRET_ID: xxx COS_SECRET_KEY: xxx COS_BUCKET: xxx COS_REGION: xxx

Getting Started

cnb-init-from https://cnb.cool/examples/ecosystem/react-cos-demo.git

Quick Start

Click the Fork button in the upper right corner to fork the project to your own repository. Then click the Cloud Native Development button to start remote development.

  1. Install dependencies
npm install
  1. Start development server (supports command line)
npm start
  1. Access the API (debug mode also available in browser)
curl http://localhost:3000