This section outlines getting the application (for the JSS public site) setup for development.
Get the repo
cd to where you keep your repos
clone the project from https: //bitbucketp.duke-energy.com/projects/DUKCOM/repos/dxt-jss-public/browse 1. In your terminal (command line), run git clone https: //bitbucketp.duke-energy.com/scm/dukcom/dxt-jss-public.git
Install dependencies
Use node -v 14.17.4
Set npm registry to Nexus (prod)* 1. run npm config set registry https: //nexus.duke-energy.com/repository/duke-cne-npm/
on the command line
Run npm install
on the command line
Setup .jssconfig and .env
Add scjssconfig.json
file (or rename scjssconfig-sample.json → scjssconfig.json)
//scjsstest.duke-energy.com" } }
Add .env
file (or rename .env-sample
→ .env)
Add:
//` for development so that jurisdiction cookies will work properly.
Setup your .hosts
file
We need to set the local IP to local.duke-energy.com
so we can use cookies set by the .duke-energy.com
domain.
On the command line, run sudo vim /etc/hosts
Add a new line and enter 127.0.0.1 local.duke-energy.com
Press Esc
key and then :x
to save and exit
Start the project for development.
Inside the project, run npm run start:connected
on the command line.
After the app successfully starts up, change the URL to https: //local.duke-energy.com:3000/home
.
Do some cool stuff
*Why are we using Nexus rather than npm for package installs?
@de-electron is a scoped npm package for [Electron Design System](https: //electron.duke-energy.com) dependencies which lives in Nexus, Duke Energy's private internal package repository. You can use Nexus to install all necessary npm packages for the project.