Git Product home page Git Product logo

www's Introduction

Build Status

Le Wagon

Dependencies

You need Postgresql and Redis running on your computer. You also need ImageMagick

Setup

After cloning the project, run:

bundle install
bin/rails db:create db:schema:load

Then ask for the ENV variables below before starting your bin/rails s server.

Configuration

The app configuration lies in config/application.yml and is not versionned by git (for security reasons). If you've just cloned this repo, ask a colleague for his application.yml file over a secure channel.

The bare minimum variables you need to start the website are:

# config/application.yml
ALUMNI_WWW_SHARED_SECRET: "ask_for_it"
ALUMNI_WWW_ENCRYPTING_KEY: "ask_for_it"
CLOUDINARY_URL: "ask_for_it"

Create a new post

To create a new blog post file, you run this command:

rails post:create

Cache

You can run this in development to bypass the API cache.

$ DISABLE_CACHE=true rails s

API Development

You can work with development API by launching a rails s -p 5000 of lewagon/alumni in another terminal tab, then launch the www rails app with:

ALUMNI_BASE_URL=http://localhost:5000/api/v1 DISABLE_CACHE=true rails s

Linkedin Token

The token lasts 2 months. To generate it, launch a rails c locally then:

oauth = LinkedIn::OAuth2.new; puts oauth.auth_code_url # Go to this URL
code = "WHAT YOU GOT FROM THE URL"
l_token = oauth.get_access_token(code); puts l_token.token
puts "will expire on #{Date.strptime(l_token.expires_at.to_s, '%s')}. You may want to add this date to the calendar"

www's People

Contributors

alex-benoit avatar american0 avatar arthur-littm avatar cedricmenteau avatar cveneziani avatar devitagus avatar eschults avatar krokrob avatar leduc81 avatar matleroux avatar monsieurpaillard avatar papillard avatar rap2hpoutre avatar soiphe avatar ssaunier avatar tgenaitay avatar

Watchers

 avatar  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.