A full-stack microblog built using Ruby on Rails and AngularJS, loosely inspired by the RoR tutorial by Michael Hartl.
The API, developed using Ruby on Rails, is defined in api/
where the interesting folders and files mainly are:
api/app/controllers
api/app/models
api/app/views
api/db/schema.rb
api/test/controllers
api/test/models
The interface can be found in public/
and is a single-page app in AngularJS comunicating with the API. The most interesting folders are:
public/app/scripts/controllers
public/app/scripts/services
public/app/styles
public/app/views
- ruby 3.2.0 (or higher)
- rails 5.0.0 (or higher)
cd api/
bundle install
rake db:create
rake db:migrate
Generate a random secret key value:
bundle exec rake secret
Copy the generated value and put it in config/initializers/secret_token.rb:
Microblog::Application.config.secret_key_base = 'your-secret'
rails s
- node
- npm
- yo
- grunt
- bower
- compass (gem install compass)
cd public/
npm install
bower update
grunt serve
If needed add (--force
)
http://localhost:9000/ will automatically be opened in your default browser