部署运行

二进制运行

源码调试模式

Sharding-UI采用前后端分离的方式。

后端

前端

配置

Sharding-UI的配置文件为conf/application.properties, 它由两部分组成。

  • 程序监听端口;
  • 登录身份验证信息。
  1. server.port=8088
  2. user.admin.username=admin
  3. user.admin.password=admin

注意事项

  • 若使用maven构建后,再进行本地运行前端项目时,可能因为node版本不一致导致运行失败,可以清空node_modules/目录后重新运行。错误日志如下:
  1. ERROR Failed to compile with 17 errors
  2. error in ./src/views/orchestration/module/instance.vue?vue&type=style&index=0&id=9e59b740&lang=scss&scoped=true&
  3. Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
  4. Error: Missing binding /sharding-sphere/sharding-ui/sharding-ui-frontend/node_modules/node-sass/vendor/darwin-x64-57/binding.node
  5. Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 8.x
  6. Found bindings for the following environments:
  7. - OS X 64-bit with Node.js 6.x
  8. This usually happens because your environment has changed since running `npm install`.
  9. Run `npm rebuild node-sass` to download the binding for your current environment.