66:language: JavaScript
77:disable-cache: true
88
9- include::{ shared} /courses/gitpod/introduction .adoc[leveloffset=+2 ]
9+ include::../../../../../../ shared/courses/codespace/get-started .adoc[]
1010
11- == Explore the Repository
11+ [%collapsible]
12+ .Develop on your local machine
13+ ====
14+ You will need link:https://nodejs.org/en/download[NodeJS] installed and the ability to install packages using `npm` .
15+
16+ Clone the link:{repository-link}[github.com/neo4j-graphacademy/app-nodejs] repository:
17+
18+ [source,bash]
19+ ----
20+ git clone https://github.com/neo4j-graphacademy/app-nodejs
21+ ----
22+
23+ Install the required packages using `npm` :
24+
25+ [source,bash]
26+ ----
27+ npm install
28+ ----
29+
30+ You do not need to create a Neo4j database as you will use the provided sandbox instance.
31+ ====
32+
33+ == Setup the environment
1234
13- You can open the repository by clicking the link below:
35+ Create a copy of the `.env.example` file and name it `.env`.
36+ Fill in the required values.
1437
15- lab::Explore Repository in GitPod[]
38+ [source]
39+ .Create a .env file
40+ ----
41+ include::{repository-raw}/main/.env.example[]
42+ ----
43+
44+ Update the Neo4j sandbox connection details:
45+
46+ NEO4J_URI:: [copy]#bolt://{sandbox-ip}:{sandbox-boltPort}#
47+ NEO4J_USERNAME:: [copy]#{sandbox-username}#
48+ NEO4J_PASSWORD:: [copy]#{sandbox-password}#
49+
50+ To run the application, open a terminal and run the following command:
51+
52+ [source,bash]
53+ npm run dev
54+
55+ == Explore the Repository
1656
1757Here are some of the important directories in the project:
1858
19- // * `.env` - This file holds environment variables for the server and is parsed by the link:https://www.npmjs.com/package/dotenv[`dotenv`^] library.
59+ * `.env` - This file holds environment variables for the server and is parsed by the link:https://www.npmjs.com/package/dotenv[`dotenv`^] library.
2060* `example/` - Example code for driver instantiation.
2161* `src/` - The application code:
2262** `middleware/` - Some custom middleware functions that are used by Express including generic error handling.
@@ -27,12 +67,6 @@ Here are some of the important directories in the project:
2767* `public/` - Minified build files for the SPA. *Do not edit these files*.
2868
2969
30- == Course Challenges
31-
32- For each challenge, you will be provided with a link to re-open the correct file within the repository.
33- Clicking these links will also set the credentials
34- load environment variables for your link:https://sandbox.neo4j.com[Neo4j Sandbox^] instance.
35-
3670== Your Sandbox Instance
3771
3872include::{shared}/courses/apps/sandbox.adoc[tag="info"]
@@ -51,8 +85,6 @@ const {
5185} = process.env
5286----
5387
54- include::{shared}/courses/apps/run-locally.adoc[]
55-
5688== Done!
5789
5890Once you are ready, click the button below to complete this lesson.
0 commit comments