Skip to Content
JavaScript Everywhere
book

JavaScript Everywhere

by Adam D. Scott
February 2020
Intermediate to advanced
344 pages
6h 37m
English
O'Reilly Media, Inc.
Content preview from JavaScript Everywhere

Appendix B. Running the Web App Locally

If you’ve chosen to follow along with the Electron portion of the book, but not the web development chapters, you will still need a copy of the web app running locally.

The first step is to ensure that you have a copy of the API running locally. If you haven’t already, please reference Appendix A for running the API locally.

With your API up and running, you can clone a copy of the web app. To clone the code to our local machine, open the terminal, navigate to the directory where you keep your projects, and git clone the project repository:

$ cd Projects
# if keeping your projects in a notedly folder, cd into the notedly directory
$ cd notedly
$ git clone git@github.com:javascripteverywhere/web.git
$ cd web

Next, you’ll need to update your environment variables by making a copy of the .sample.env file and populating the information in the newly created .env file.

In your terminal, run:

$ cp .env.example .env

Now, in your text editor, update the values of the .env file to make sure that it matches the URL of your locally running API. If everything is kept at the default values, you shouldn’t need to make any changes.

API_URI=http://localhost:4000/api

Finally, you can run the final web code example. In your terminal application, run:

$ npm run final

After working through these instructions, you should have a copy of the Notedly web application running locally on your system.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Modern JavaScript Bootcamp (2019)

The Modern JavaScript Bootcamp (2019)

Andrew Mead
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz

Publisher Resources

ISBN: 9781492046974Errata PageSupplemental Content