Skip to content

A very first blog written in Lotus Framework (it's not complete yet)

Notifications You must be signed in to change notification settings

koolapps/lotus-blog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microblog

Build Status

YOLO You are hyped when someone mention microservices? Look no further Microblog is the first blog in Lotus Framework - EVER!

The app is created to demo the modularity of Lotus. It consists of 3 apps:

  • admin - web frontend for administration
  • web - web frontend for public
  • api - web api

Bootstrap

Run ./setup.sh

It works ma!

To start the server:

bundle exec lotus server

Then you could browse the site with 0.0.0.0:2300

The admin page is at /admin and the default username/password is "admin/password". You can change password to what you like by modifying ADMIN_PASSWORD variable in config/env.development.

If you are interested in Web API, please look into apps/api/v1. You can do API call with curl: curl -i -H "Accept: application/json" http://0.0.0.0:2300/api/v1/posts or curl -i -H "Accept: application/json" http://0.0.0.0:2300/api/v1/posts/:id

Ma! I passed my test!

To run tests:

bundle exec rake spec

Deployment to Heroku

Set up Heroku:

heroku create

Set up DB URL by getting the URL with:

heroku config | grep HEROKU_POSTGRESQL

You should get something like HEROKU_POSTGRESQL_COLOR, which value is used to set DB URI:

heroku config:set MICROBLOG_DATABASE_URL="postgres://something:[email protected]:5432/something"

Then run

heroku run rake db:migrate
heroku run rake db:seed

Last step is to set admin password:

heroku config:set ADMIN_PASSWORD="password"

Deploy with:

git push heroku master

Once done, try to the deployed app with:

heroku open

Credits

License

MIT

TODO

  • Add support for migration generator / schema for Lotus Framework
  • Add pagination
  • Use named routes for Admin templates/forms (must be fixed in Lotus core)
  • Add unit / integration tests
  • Support user login feature (waiting for session non-persistence error to be resolved upstream in Lotus core)
  • Find a way to share vendor JS/stylesheets between 2 apps

Contribution

Please feel free to submit PRs :)

Copyright

© 2014-2015 Trung Lê

About

A very first blog written in Lotus Framework (it's not complete yet)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 84.4%
  • HTML 12.4%
  • CSS 2.7%
  • Shell 0.5%