How to run html file using node js

前端 未结 8 935
南笙
南笙 2021-01-30 11:04

I have a simple html page with angular js as follows:

    //Application name
    var app = angular.module(\"myTmoApppdl\", []);

    app.controller(\"myCtrl\", f         


        
8条回答
  •  情深已故
    2021-01-30 11:34

    Just install http-server globally

    npm install -g http-server

    where ever you need to run a html file run the command http-server For ex: your html file is in /home/project/index.html you can do /home/project/$ http-server

    That will give you a link to accessyour webpages: http-server Starting up http-server, serving ./ Available on: http://127.0.0.1:8080 http://192.168.0.106:8080

提交回复
热议问题