Skip to content

Latest commit

 

History

History
65 lines (57 loc) · 1.68 KB

README.md

File metadata and controls

65 lines (57 loc) · 1.68 KB

The framework: Next.js.

Next.js supports SPA, SSG and SSR. With this feature, the dashboard ui can be deployed in

  1. Standalone machine serving only dashboard UI with a backend. (e.g. Dashboard for cloud product)
  2. Meta service node. (e.g. Static HTML files integrated in meta service without any other dependencies like node.js)

Files

dashboard/
--.next/ (generated by nextjs)
--node_modules/ (development dependencies)
--out/ (generated static files)
--components/ (React Component)
--lib/ (useful functions and classes)
--pages/ (web pages)
--public/ (static resources)
--styles/ (static css files)
--test/ (test cases)

Testing

TODO: Find a suitable testing framework

Development

Start the RisingWave database, remove drop tables from tpch_snapshot.slt

./risedev d
sqllogictest -p 4566 -d dev './e2e_test/streaming/tpch_snapshot.slt'

Install Dependencies.

npm i

The website will be served at port 3000.

npm run dev

You should also run:

node mock-server.js

To start a mock API server when developing. You can use fetch.sh to update the mock APIs.

Test with RisingWave meta node

To replace the built static files in RisingWave with your newest code, run the following scripts in the root directory.

./risedev export-dashboard-v2

Deployment

Static HTML files

Build static files for standalone deployment without node.js. The built files are generated at ./out. Check more details at Static HTML Export.

npm run build-static

Next.js app

The built files are generated at ./.next.

npm run build
npm run start