You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Go to <ahref="https://developer.here.com"target="_blank">https://developer.here.com</a>
264
-
- Sign up and create a Freemium project
265
-
- Create JAVASCRIPT/REST credentials. Copy and paste the APP_ID and APP into `.env` file.
266
-
-Note that these credentials are available on the client-side, and you need to create a domain whitelist for your app credentials when you are publicly launching the app.
264
+
- Sign up for the Base plan. The Base plan require a credit card to start, but you get 30,000 map renders for free each month.
265
+
- Create JAVASCRIPT/REST credentials. Copy and paste the API key into the `.env` file as HERE_API_KEY, or set it up as an environment variable.
266
+
-**Set up Trusted Domain** - Your credentials will go to the client-side (browser of the users). You need to enable trusted domains and add your test domain address. Otherwise, others may be able to use your credentials on other websites, go through your quota, and potentially leave you with a bill.
267
267
268
268
<hr>
269
269
@@ -667,7 +667,7 @@ to create a flash message in your controllers, and then display them in your vie
667
667
```pug
668
668
if messages.errors
669
669
.alert.alert-danger.fade.in
670
-
for error in messages.errors
670
+
each error in messages.errors
671
671
div= error.msg
672
672
```
673
673
@@ -695,7 +695,7 @@ req.flash('warning', { msg: 'You have exceeded 90% of your data usage' });
695
695
```pug
696
696
if messages.warning
697
697
.alert.alert-warning.fade.in
698
-
for warning in messages.warning
698
+
each warning in messages.warning
699
699
div= warning.msg
700
700
```
701
701
@@ -705,13 +705,13 @@ The flash messages partial template is _included_ in the `layout.pug`, along wit
705
705
706
706
```pug
707
707
body
708
-
include partials/header
708
+
include partials/header
709
709
710
-
.container
711
-
include partials/flash
712
-
block content
710
+
.container
711
+
include partials/flash
712
+
block content
713
713
714
-
include partials/footer
714
+
include partials/footer
715
715
```
716
716
717
717
If you have any further questions about flash messages, please feel free to open an issue, and I will update this mini-guide accordingly, or send a pull request if you would like to include something that I missed.
@@ -821,7 +821,7 @@ block content
821
821
h3 All Books
822
822
823
823
ul
824
-
for book in books
824
+
each book in books
825
825
li= book.name
826
826
```
827
827
@@ -913,11 +913,11 @@ If you want to stick all your JavaScript inside templates, then in `layout.pug`
**Note:** Notice the path of the `socket.io.js`, you don't actually have to have `socket.io.js` file anywhere in your project; it will be generated automatically at runtime.
0 commit comments