Solving the New York Times Spelling Bee in Ruby

Photo from the New York Times
Photo from the New York Times Spelling Bee
  1. Make a file called .env in the root folder (this is at the same level as the bin, lib, README.md, etc).
  2. In the new .env file, add your private key. I named my key: WORDSAPI_KEY. The .env file should look something like this: WORDSAPI_KEY=lfkjskjfiojfoejif
  3. Now your program can access the API key with ENV[‘WORDSAPI_KEY’] in the API call.
  4. To upload to GitHub or another version control site, make sure git will ignore your.env file. In the .gitignore file, add .env to exclude it from the upload.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store