An Example of setting Webpack within Hanami project
- Ruby 2.4.1
- Node 7.8.0
- yarn or npm (yarn recommended)
-
Install Hanami gem (If you don't installed it yet)
gem install hanami
-
And all the dependencies
bundle install
-
Migrate a database
bundle exec hanami db migrate
-
Install node modules
yarn install
-
Bundle assets
yarn webpack / $ yarn dev (for development) yarn build (for production)
-
Start the server
bundle exec hanami server
-
Look for what is going on - http://localhost:2300