Skip to content

KillianAB/www

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

🚀 The French innovative coding school for entrepreneurs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 54.4%
  • CSS 21.7%
  • Ruby 17.4%
  • JavaScript 6.5%