Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
JavaScript by Example

You're reading from   JavaScript by Example Learn modern web development with real-world applications

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781788293969
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dani Akash S Dani Akash S
Author Profile Icon Dani Akash S
Dani Akash S
Arrow right icon
View More author details
Toc

Initial project setup

To get started with the project, open up the starter files for Chapter 3 in VSCode. Create a .env file with the values from the .env.example file. Assign the following values to each environment variable:

  • NODE_ENV=dev: Should be set to production when generating a build.
  • SERVER_URL=http://localhost:3000: We will soon have a server running in this URL.
  • GMAP_KEY: We are going to use the Google Maps API in this project. You need to generate your unique API key to use Google Maps. See: https://developers.google.com/maps/documentation/javascript/get-api-key to generate your API key and add the key to this environment variable.

Earlier in Chapter 2, Building a Meme Creator, I mentioned that you cannot access your JavaScript variables inside HTML when the modules are bundled with Webpack. In Chapter 1, Building a ToDo List, we used the HTML attribute to call a...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image