You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
586 B

8 years ago
  1. ## Distribute with your project
  2. The standard convention with client-server applications is to add an `npm start` command to launch the server component.
  3. 1\. Install the server as a dev dependency
  4. ```sh
  5. $ npm install local-web-server --save-dev
  6. ```
  7. 2\. Add a `start` command to your `package.json`:
  8. ```json
  9. {
  10. "name": "example",
  11. "version": "1.0.0",
  12. "local-web-server": {
  13. "port": 8100,
  14. "forbid": "*.json"
  15. },
  16. "scripts": {
  17. "start": "ws"
  18. }
  19. }
  20. ```
  21. 3\. Document how to build and launch your site
  22. ```sh
  23. $ npm install
  24. $ npm start
  25. serving at http://localhost:8100
  26. ```