1 - Hello world
This folder contains the sample code for the Hello world tutorial. Please refer to the tutorial for instructions on configuring, running, and deploying this sample.
Simple instructions
-
Install Node.js.
- Optional: Install Yarn.
-
Install git.
-
Create a Google Cloud Platform project.
-
Install the Google Cloud SDK.
-
After downloading the SDK, initialize it:
gcloud init
-
-
Clone the repository:
git clone https://github.com/GoogleCloudPlatform/nodejs-getting-started.git
-
Change directory:
cd nodejs-getting-started/1-hello-world
-
Install dependencies using NPM or Yarn:
-
Using NPM:
npm install
-
Using Yarn:
yarn install
-
-
Start the app using NPM or Yarn:
-
Using NPM:
npm start
-
Using Yarn:
yarn start
-
-
View the app at http://localhost:8080.
-
Stop the app by pressing
Ctrl+C
. -
Deploy the app:
gcloud app deploy
-
View the deployed app at https://YOUR_PROJECT_ID.appspot.com.