Coder Social home page Coder Social logo

ror-blog's Introduction

What is this?

This repo contains a sample blog built with Ruby on Rails. There are instructions below to get the app working in both development and production environments.

Requirements

  1. Articles
  • Unauthenticated users can view articles
  • Admins can create, edit, delete, and view articles
  • Article resources has title, blurb (summary of main content), body, tags, and comments
  1. Tags
  • Tags have many-to-many relationship with articles
  • Can display list of tags
  • Can display list of articles for a given tag
  1. Comments
  • Unauthenticated users can create and view comments
  • Admins can create, view, and delete comments
  • Comments are limited to five per article to avoid spamming
  1. Data
  • Article and tag data can be seeded using a database seeder
  1. Assets
  • SASS is compiled into CSS and serverd to the user
  • Coffee script is compiled into JS and served to the user
  1. Production
  • The code can run in a production environment using Nginx, Unicorn, and Linux
  • Code can be deployed via Capistrano
  • All routes are sent via SSL

Development Server

To get a development version of the app running follow the steps below:

  1. Clone the repository
  2. Run "rails server"
  3. Run "rake db:seed"

Production Server

To get a development version of the app running follow the steps below:

  1. Log onto Digital ocean and spin up a server with Ubuntu 14.04 x 64
  2. Install Ruby and rbenv according to this tutorial
  3. Configure the server with Unicorn and Nginx according to this tutorial
  • The only divergence from the tutorial is that you need to point the root in your Nginx configuration to "/public/current" instead of "/public" for Capistrano
  1. Follow this tutorial to get SSL working with LetsEncrypt
  2. Make sure that you have SECRET_KEY_BASE set and RAILS_ENV=production in your .rbenv-vars file in the root of the app
  3. Change the server settings in the "/config/deploy/production.rb" file to your server's IP and a user with sudo capability
  4. Run "bundle exec cap production deploy:inital"
  5. SSH into your server and run "rake db:seed"
  6. Navigate to your server's IP in the browser to use the blog app!

ror-blog's People

Contributors

galopeian1 avatar zackthoutt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.