You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.7 KiB
Markdown
68 lines
1.7 KiB
Markdown
|
4 years ago
|
# Local environment Setup
|
||
|
|
|
||
|
|
* Postman JSON for API [Link](https://razermis.sharepoint.com/:f:/s/RazerGoldKM-Engineering/Elm1CcUhDy5Bi8DnqkrfjFcBhTlxw1659hAJVTdhBxqSxw?e=8PxaYZ)
|
||
|
|
|
||
|
|
* [Engineering Doc](https://razermis.sharepoint.com/:f:/s/RazerGoldKM-Engineering/EjcLZaXu9ZhLtqeJgUQxeF8Bn2jGEe8l5UOOKiTPT8iXWQ?e=ZnCFbc)
|
||
|
|
|
||
|
|
* Visual Studio Code
|
||
|
|
|
||
|
|
* NodeJS
|
||
|
|
|
||
|
|
* FortiClient VPN access to connec to dev server
|
||
|
|
|
||
|
|
* Create Razer Dev Account
|
||
|
|
|
||
|
|
* https://dweb.zgold-dev.razer.com/
|
||
|
|
|
||
|
|
* SSL cert files under `C:\etc\ssl\nodejs`
|
||
|
|
|
||
|
|
* [`zgdwild.chain`](./ssl/zgdwild.chain)
|
||
|
|
* [`zgdwild.key`](./ssl/zgdwild.key)
|
||
|
|
* [`zgdwild.pem`](./ssl/zgdwild.pem)
|
||
|
|
|
||
|
|
* host file `C:\Windows\System32\drivers\etc\hosts`
|
||
|
|
|
||
|
|
* ```text
|
||
|
|
127.0.0.1 www.zgold-dev.razer.com
|
||
|
|
```
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
* Start BE server. BE server also serve FE at port 443 `./dist`
|
||
|
|
|
||
|
|
* `npm start`
|
||
|
|
|
||
|
|
* Start FE server to proxy from `https://www.zgold-dev.razer.com:7888/api` to `https://localhost/api`
|
||
|
|
|
||
|
|
* `npm run serve` to serve FE webpack
|
||
|
|
|
||
|
|
* Hot Reload editing here
|
||
|
|
|
||
|
|
* proxy setup in `webpack.dev.js`
|
||
|
|
|
||
|
|
```json
|
||
|
|
devServer: {
|
||
|
|
allowedHosts: [
|
||
|
|
'media.zvault.razerzone.com',
|
||
|
|
'media.gold.razer.com'
|
||
|
|
],
|
||
|
|
contentBase: dist,
|
||
|
|
publicPath: '/',
|
||
|
|
open: true,
|
||
|
|
progress: true,
|
||
|
|
host: Environment.webpackHost,
|
||
|
|
port: Environment.webpackPort,
|
||
|
|
proxy: {
|
||
|
|
'/api': 'https://www.zgold-dev.razer.com'
|
||
|
|
},
|
||
|
|
https: {
|
||
|
|
ca: fs.readFileSync(Environment.ssl.ca, 'utf8'),
|
||
|
|
key: fs.readFileSync(Environment.ssl.key, 'utf8'),
|
||
|
|
cert: fs.readFileSync(Environment.ssl.cert, 'utf8'),
|
||
|
|
spdy: {
|
||
|
|
protocols: ['http/1.1']
|
||
|
|
}
|
||
|
|
},
|
||
|
|
```
|
||
|
|
|
||
|
|
|