Simple and lightweight boilerplate to build React applications for ServiceNow.
Based on Create-React-App.
You need to complete 3 steps so you can start bulding a React applicaiton for ServiceNow:
- Copy this repo to your local machine and run
npm install
to install all dependencies. - Update
package.json
(line #5) with your ServiceNow instance URL:
"proxy":"https://dev38444.service-now.com"
- Update
.env
file with user credentials you want to use for communications wtih ServiceNow:
REACT_APP_USER=servicenow.account
REACT_APP_PASSWORD=12345
This completes development environment setup and you can run the application by npm start
.
User name and password required for development environment only. You don't need to provide credentials when deploying the app into ServiceNow.
To deploy the application into ServiceNow you need to perform the following steps:
- Build the application by executing
npm run build
. - Save JS and CSS files from Build folder as Style Sheets in ServiceNow.
- Save HTML file from Build folder as a UI page. Update references to JS/CSS correspondingly.
You can find more details in this article.