Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. 127.0.0.2 myapp.dev
  2. 127.0.0.3 api.myapp.dev
  3.  
  4. # -w -p 3001
  5.  
  6. require 'emeraldfw'
  7.  
  8. ENVIRONMENT = ENV['EMERALD_ENV'].nil? ? :development : ENV['EMERALD_ENV']
  9.  
  10. use Rack::Reloader, 0
  11. use Rack::ContentLength
  12.  
  13. if (ENVIRONMENT == :production) then
  14. use Rack::Static, :urls => {"/" => 'index.html'}, :root => 'fe/build'
  15. else
  16. Dir.chdir('fe')
  17. spawn 'npm start'
  18. Dir.chdir('..')
  19. end
  20. run EmeraldFW::Loader.new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement