@6river/strap-core 中文文档教程
strap
用于配置开发人员机器的引导脚本。
Development
npm install
npm start
- http://localhost:5000
在生产环境中构建和运行应用程序
npm run start:prod
- http://localhost:5000
: 在应用程序前面运行 HTTPS 代理:
npm start
- in another terminal session:
npm run proxy
- https://localhost:3000
运行一次测试:
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 IDGITHUB_SECRET
: GitHub application client secretARTIFACTORY_TOKEN
: API key of an Artifactory administrator accountARTIFACTORY_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 to5000
SESSION_SECRET
: secret token to use for sessions, defaults to a randomly generated tokenLOG_LEVEL
:trace
,debug
,info
,warn
,fatal
, orsilent
, defaults toinfo
Resources
strap
Bootstrap script for provisioning developer machines.
Development
npm install
npm start
- http://localhost:5000
To build and run the app in production:
npm run start:prod
- http://localhost:5000
To run an HTTPS proxy in front of the app:
npm start
- in another terminal session:
npm run proxy
- https://localhost:3000
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 IDGITHUB_SECRET
: GitHub application client secretARTIFACTORY_TOKEN
: API key of an Artifactory administrator accountARTIFACTORY_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 to5000
SESSION_SECRET
: secret token to use for sessions, defaults to a randomly generated tokenLOG_LEVEL
:trace
,debug
,info
,warn
,fatal
, orsilent
, defaults toinfo