@6river/strap-core 中文文档教程

发布于 4年前 浏览 29 项目主页 更新于 3年前

strap

codecovCircleCI

用于配置开发人员机器的引导脚本。

Development

在生产环境中构建和运行应用程序

: 在应用程序前面运行 HTTPS 代理:

运行一次测试:

  • npm run test:single

运行测试并重新运行更改:

  • npm test

lint:

  • npm run lint

构建:

  • npm run build

Usage

在本地运行 Web 应用程序运行:

git clone https://github.com/6RiverSystems/strap-core
cd strap-core
npm install
# Setup config.json5
GITHUB_KEY="..." GITHUB_SECRET="..." npm start

Web Application Environment Variables

Required

  • GITHUB_KEY: GitHub application client ID
  • GITHUB_SECRET: GitHub application client secret
  • ARTIFACTORY_TOKEN: API key of an Artifactory administrator account
  • ARTIFACTORY_URL: base URL of the hosted Artifactory instance, i.e. https://foo.jfrog.io/foo/ (include trailing slash)

Optional

  • PORT: the port to run the application on, defaults to 5000
  • SESSION_SECRET: secret token to use for sessions, defaults to a randomly generated token
  • LOG_LEVEL: trace, debug, info, warn, fatal, or silent, defaults to info

Resources

strap

codecovCircleCI

Bootstrap script for provisioning developer machines.

Development

To build and run the app in production:

To run an HTTPS proxy in front of the app:

To run tests once:

  • npm run test:single

To run tests and re-run on changes:

  • npm test

To lint:

  • npm run lint

To build:

  • npm run build

Usage

To run the web application locally run:

git clone https://github.com/6RiverSystems/strap-core
cd strap-core
npm install
# Setup config.json5
GITHUB_KEY="..." GITHUB_SECRET="..." npm start

Web Application Environment Variables

Required

  • GITHUB_KEY: GitHub application client ID
  • GITHUB_SECRET: GitHub application client secret
  • ARTIFACTORY_TOKEN: API key of an Artifactory administrator account
  • ARTIFACTORY_URL: base URL of the hosted Artifactory instance, i.e. https://foo.jfrog.io/foo/ (include trailing slash)

Optional

  • PORT: the port to run the application on, defaults to 5000
  • SESSION_SECRET: secret token to use for sessions, defaults to a randomly generated token
  • LOG_LEVEL: trace, debug, info, warn, fatal, or silent, defaults to info

Resources

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文