Guest User

Untitled

a guest
Nov 20th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. app.use(express.static(path.join(__dirname, 'public')));
  2.  
  3. project_root/
  4. node_modules/
  5. public/
  6. static/
  7. node_modules/ # symlinked directory
  8.  
  9. # symlink node_modules to public directory
  10. rm -rf "${postinstall_pwd}/public/static/*"
  11. rm -rf "${postinstall_pwd}/public/static/node_modules"
  12. mkdir -p "${postinstall_pwd}/public/static"
  13. ln -s "${postinstall_pwd}/node_modules" "${postinstall_pwd}/public/static"
  14.  
  15. app.use(express.static(path.join(__dirname, 'public')));
  16. app.use(express.static(path.join(__dirname, 'node_modules')));
Add Comment
Please, Sign In to add comment