data-fair/openapi-viewer

page does not load in local machine

Opened this issue · 5 comments

I ran build and then dev commands, the page (url - http://localhost:5601/) hangs and never loads. I have win 10 machine.

Unfortunately, I don't have a win 10 machine. Can you run the 3 commands of the dev script in package.json in 3 different terminals ?

NODE_ENV=development webpack --watch
NODE_ENV=development nodemon server/app.js
browser-sync start --config bs-config.js

I had the same problem. I get this error:

$ npm run dev

> openapi-viewer@0.1.0 dev C:\PhpstormProjects\openapi-viewer
> NODE_ENV=development webpack --watch & browser-sync start --config bs-config.js & NODE_ENV=development nodemon server/app.js

'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.

In windows, to set an environment variable you need to use Set node_env=development. Then I ran 3 commands in separate windows and it worked.

here are the 3 commands:

set NODE_ENV=development&& .\node_modules\.bin\webpack.cmd --watch
set NODE_ENV=development&& .\node_modules\.bin\nodemon.cmd ".\server\app.js"
set NODE_ENV=development&&.\node_modules\.bin\browser-sync.cmd  start --config bs-config.js

Thanks for the fix. We will either add it to the readme or remove the need for environment variables in development mode

I removed the need for environment variables in development mode, can you tell me if it is ok ?