logo
0
0
Login

Node + React + Rsync

badge badge badge

In this example, you will use Cloud Native Build to package the "react-ssh-demo" project, build it and upload the artifacts to the server via Rsync.

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 Rsync plugin
  6. Use SSH plugin

Configuration Secrets

# react-ssh-secret.yml REMOTE_HOST: xxx REMOTE_USERNAME: xxx REMOTE_PORT: xxx PRIVATE_KEY: | -----BEGIN RSA PRIVATE KEY----- xxxxxxxx -----END RSA PRIVATE KEY-----

Remote Development

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.

Start Service

npm install npm run start

Preview

curl http://localhost:3000

About

react 构建并将静态资源部署到目标服务器

Language
JavaScript35.1%
HTML31.6%
CSS17.1%
Dockerfile16.3%