Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Testing a basic NodeJS server with StencilJS components and their interactions with GCP-managed databases

License

Notifications You must be signed in to change notification settings

doitintl/stenciljs-db-integration-testing

Repository files navigation

stenciljs-db-integration-testing

Within a new GCP project, following the automated deployment instructions below will create a basic NodeJS + Bootstrap 4 web server utilizing StencilJS components that interacts with a MySQL database on Cloud SQL. The web server demonstrates (1) writes to a MySQL DB hosted on Cloud SQL via a Contact form page, and (2) reads from that database via the Homepage.

GCP Project setup

Create a new GCP project, open up Cloud Shell, and run the following:

git clone https://github.com/doit-mattporter/stenciljs-db-integration-testing.git
# If desired, edit stenciljs-db-integration-testing/bootstrap/project_variables.sh
chmod +x stenciljs-db-integration-testing/bootstrap/project_setup.sh
./stenciljs-db-integration-testing/bootstrap/project_setup.sh

Compute Engine StencilJS VM

The web server listens at: http://<vm_public_ip>:8080

To manually restart nodemon, SSH onto the VM and run: nodemon /opt/stenciljs-db-integration-testing/server.js. Make sure nodemon is not already running.

About

Testing a basic NodeJS server with StencilJS components and their interactions with GCP-managed databases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published