publish file server

In actual development, sometimes we need to simulate the server file system, so we need to use the server file system related functions.

There are several more convenient tools, such as the combination of Node and express, anywhere, http-server.

anywhere

  Use npm install anywhere -g to install globally, of course, cnpm can also be used. Execute anywhere in the directory corresponding to the local file you want to publish.

  Other commands:

  1. anywhere -p 8000 ## Specify the port number of the static server  
  2. anywhere -s ## execute silently without opening the browser 

http-client

  Also use node to installnpm install -g http-server。

  start, http-server -a 127.0.0.1 -p 7070

  You can also configure package.json

  "scripts": {

    "start" "http-server -a 127.0.0.1 -p 7070"
   }
  After writing, you can use npm start to start the server
 
Attached angular cli operation instructions

1. Service startup: ng serve (-o, --open)
2. Create service: ng generate service XXX (--module=app)
3. (routing) create: ng generate module app-routing --flat --module =app
4. Create component: ng generate component XXX

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325021499&siteId=291194637