This is a starter ExpressJs project, you can run it as a standalone
app using npm run server
in the root of the project.
The server will be listening to request on port 3000
,
so you can test the server in a browser accessing http://localhost:3000
or via cURL
.
Before running the command npm run server
you need to run npm install
to
install the dependencies
NOTE: The provided
config/workload.yaml
file uses the Git URL for this sample. When you want to modify the source, you must push the code to your own Git repository and then update thespec.source.git
information in theconfig/workload.yaml
file.
When you are done developing your app, you can simply deploy it using:
tanzu apps workload apply -f config/workload.yaml
If you would like deploy the code from your local working directory you can use the following command:
tanzu apps workload create node-express -f config/workload.yaml \
--local-path . \
--type web
If you don't have curl
installed it can be installed using downloads here: https://curl.se/download.html
Determine the URL to use for the accessing the app by running:
tanzu apps workload get node-express
To access the deployed app open the URL shown in your browser.
This depends on the TAP installation having DNS configured for the Knative ingress.