I cannot run Yeoman-angular-full machine generator on vps CentOS7 server

I have a problem with xdg-open when I try to run "grunt serve: dist" on a CentOS 7 VPS with the following message:

Warning: command failed: xdg-open: method not available to open 'http://0.0.0.0:9000'

I tried reinstalling xdg-util, but it didn't work.

Can anyone help me with this problem?

Thanks in advance!

+3
angularjs centos7 yeoman-generator-angular


source to share


2 answers


grunt serve:dist

not built to serve your site, just a preview of the dist under development.

To service your project, you need:



  • generate folder dist/

    with grunt

    orgrunt build

  • go to dist/

    thennode server.js

+7


source to share


grunt serve:dist

should serve your app fine with the express: prod function - have you tried navigating to the url manually? Do you have a default browser?

The error message you received is because the web browser is not configured to open the resulting URL. Perhaps install Chromium or your preferred browser and try again? There is also a way to specify the open command for use in the open access task runner.



See https://github.com/jsoverson/grunt-open for details .

0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics