A simple guide on how to install this project on your local machine!
-
You will need to have Google Chrome installed (it's a Chrome extension 🤣)
-
Also, make sure that you have Node.js and npm installed. Here's a handy guide from the npm site!
-
These external APIs will not work on your local machine, since I can't possible share the production API keys 🔑 with everyone:
- Unsplash (so you won't get to see a background image 😢)
- ResponsiveVoice (no text-to-speech for the chosen word!)
-
Make sure you have the repository in your local machine! You can go to the Contributing Guidelines for steps on how to fork this repo.
The Node.js server is where we'll be getting the word for the day, and the supported languages.
- Go to the
server
folder.
cd server
- Create a
.env
file so that we can set the port to3100
.
echo PORT=3100 >> .env
- Install dependencies needed for this project.
npm install
- Start the server!
npm start
- If you see something like this in your console, that means you're good to go! ✨ Do not close this terminal.
> letra@1.0.0 start {{ serverFilePathHere }}
> node server.js
This is what we'll be using for the frontend of the site.
- Open a new terminal. Do not use the same one from the Node.js setup. Navigate to
client
folder.
cd client
- Create a
.env
file and set the API url tohttp://localhost:3100
. This will enable us to connect our Vue app to the NodeJS server.
echo VUE_APP_API_URL=http://localhost:3100 >> .env
- Same as in the first part, we'll need to install dependencies.
npm install
- Since we need the
dist
folder for the extension, we'll need to watch any file changes. Do not close this terminal.
npm run watch:dev
- If you see something like this, you're good to go!!
[ Starting the Hot Extension Reload Server... ]
webpack is watching the files…
Final steps!! 🏃🏽♂️ We'll just need to setup our browser to allow development of Chrome extensions.
-
Open Google Chrome. Click on the three dots at the upper right of the screen. Then click on
More Tools
->Extensions
. -
You should now be in the Extensions page. Enable Developer Mode by clicking on the switch at the upper right of the screen.
-
We need to load the compiled files (from Vue.js above) to Chrome. We'll do this by clicking on
Load unpacked
. -
Navigate to where your
letra-extension
repository is. Go toclient -> dist
and select this folder. -
The extension should now be loaded on the page! 🎉 You can test it by well, opening a new tab.
Let me know if any of these steps are unclear! I'd be happy to help out in setting up your local copy.