Skip to content

Commit 93ede6e

Browse files
migrate project to codespace (#322)
1 parent 73ce6c3 commit 93ede6e

File tree

3 files changed

+46
-30
lines changed

3 files changed

+46
-30
lines changed

asciidoc/courses/app-nodejs/modules/0-setup/lessons/1-setup/lesson.adoc

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,57 @@
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

1757
Here 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

3872
include::{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

5890
Once you are ready, click the button below to complete this lesson.

asciidoc/courses/app-nodejs/modules/0-setup/module.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For readability, the course will also use `async`/`await` syntax.
2828

2929
== Get Started
3030

31-
In the next lesson, we will explore the project in Gitpod and and introduce you to Neo4j Sandbox.
31+
In the next lesson, you will setup your development environment and explore the project.
3232

3333

3434
link:./1-setup/[Setup the Repository →, role=btn]

asciidoc/courses/app-nodejs/modules/1-driver/lessons/1-about/lesson.adoc

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,19 @@ You should create a **single instance** of the Driver in your application per Ne
2424

2525
The Neo4j JavaScript Driver is available through the npm registry and can be installed with either `npm` or `yarn`.
2626

27-
[.tab]
28-
.NPM
29-
====
3027
To install using link:https://www.npmjs.com/[NPM^], run the following command.
3128

3229
.NPM
3330
[source,shell]
3431
npm install --save neo4j-driver
3532

36-
// include::{repository-raw}/main/README.adoc[tag=npm]
37-
38-
The `--save` option saves a reference to the `neo4j-driver` package in your `package.json` file.
39-
40-
====
41-
42-
[.tab]
43-
.Yarn
44-
====
45-
4633
To install using link:https://yarnpkg.com/[Yarn^], run the following command.
4734

4835
.Yarn
4936
[source,shell]
5037
yarn add --save neo4j-driver
5138

52-
// include::{repository-raw}/main/README.adoc[tag=yarn]
53-
5439
The `--save` option will save a reference to the `neo4j-driver` package in your `package.json` file.
55-
====
5640

5741
== Creating a Driver Instance
5842

0 commit comments

Comments
 (0)