Guest User

Untitled

a guest
Dec 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. 1. Add to `.gitignore`:
  2.  
  3. ```
  4. node_modules
  5. public
  6. ```
  7.  
  8. 2. Add to your app `dependencies` of `package.json`:
  9.  
  10. ```
  11. "statik": ">= 1.1.0",
  12. "brunch": ">= 1.0 < 1.5",
  13. ```
  14.  
  15. and move `devDependencies` to `dependencies` if they’re not already there:
  16.  
  17. ```
  18. "chai": "1.2.0",
  19. "sinon": "1.4.2",
  20. "sinon-chai": "2.1.2"
  21. ```
  22.  
  23. 3. Create `server.js`:
  24.  
  25. ```javascript
  26. var statik = require('statik');
  27. var server = statik.createServer();
  28. server.listen(process.env.PORT || 1337);
  29. ```
  30.  
  31. 4. Add Procfile.
  32.  
  33. ```
  34. web: node server.js
  35. ```
  36.  
  37. 5. Add to `scripts` section of `package.json`:
  38.  
  39. ```
  40. "postinstall": "brunch build --minify"
  41. ```
  42.  
  43. 6. Deploy, PROFIT!
Add Comment
Please, Sign In to add comment