@flaredev.io/flare-edge
v1.2.2
Published
Package for deploying ServiceNow web applications to FlareEdge
Downloads
9
Maintainers
Readme
flaredev.io/flare-edge
flaredev.io/flare-edge
allows you to deploy web applications to Flare Edge platform and serve them on your ServiceNow instance.
Installation
Install the package globally via npm:
npm install -g @flaredev.io/flare-edge
Configuration
You already should have a Flare Edge project in ServiceNow that displays configuration parameters for a container.
Download flare-edge.config.json
file and place it to the root of your project.
Flare Edge configuraiton file has the following structure:
{
"gateway": "xxx",
"gatewayKey": "xxx",
"apiKey": "xxx",
"secretKey": "xxx",
"domainSpace": "xxx",
"containerName": "xxx",
"base": "xxx",
"folderPath": "./dist",
}
The following paramenters you should recieve from the vendor:
gateway
: Flare Gateway host name.gatewayKey
: Flare Gateway secret key.apiKey
: Your Flare Edge API key.secretKey
: Your Flare Edge secret key.
This parameter generated by ServiceNow:
container
: Your Flare Edge container identifier.
Parameters for your local development environment:
folderPath
: The path to your web application's build folder.base
: The base URL for your deployed application on Flare Edge. You need to specify this param in your bundler options to make sure all resources referenced properly.
IMPORTANT: You must build your project with the base path specified in config file - that is a unique secured container referenced to ServiceNow instance.
If you want to make a snapshot of the source code of your application while deploying to Flare Edge just add "servicenow" key to the config file:
{
"servicenow": {
"instance": "https://my-instance.service-now.com",
"username": "foo",
"password": "bar",
"project_sys_id": "338024ce1bcfa510041ca9bd2a4bcba7"
}
}
This will zip the source code and store it in ServiceNow on the corresponding Flare Edge record every time when you do a deployment.
Usage
To deploy your web application to Flare Edge:
- Buld the project with the corresponding output folder and the base path.
- Run the following command in your project's root folder:
flare-edge deploy
This command will read the flare-edge.config.json
file, and deploy the contents of the specified buildFolderPath
to the Flare Edge platform.
Support
If you encounter any issues or need help, please visit the official GitHub repository and open an issue or submit a pull request.
License
This project is licensed under the Apache-2.0 license. See the LICENSE file for more information.