https://github.com/devkimchi/jamstack-intro-demo
This provides sample codes of a JAM Stack app for each cloud service providers including Azure, AWS and Google
https://github.com/devkimchi/jamstack-intro-demo
Last synced: 5 months ago
JSON representation
This provides sample codes of a JAM Stack app for each cloud service providers including Azure, AWS and Google
- Host: GitHub
- URL: https://github.com/devkimchi/jamstack-intro-demo
- Owner: devkimchi
- License: mit
- Created: 2021-01-22T09:01:53.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-28T13:16:04.000Z (almost 5 years ago)
- Last Synced: 2025-04-11T23:40:35.042Z (9 months ago)
- Language: CSS
- Size: 613 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JAMStack Intro Demo #
This provides sample codes of a JAM Stack app for each cloud service providers including Google, AWS and Azure.
## Getting Started ##
There is a static web app generated by [Gatsby](https://www.gatsbyjs.com/), which is located at the `app` directory.
### Run Gatsby App Locally ###
Run the following command to run the Gatsby app on your local machine.
```bash
cd app
npm ci && npm run build
npm run develop
```
Once confirming the app running on your local machine successfully, deploy the app to the Cloud.
### Deploy Gatsby App onto Google Firebase ###
First of all, make sure that you've got `Firebase CLI` installed on your local machine.
```bash
npm install -g firebase-tools
```
Then, configure the Firebase CLI by running the command, and enter your access details.
```bash
firebase login
```
Prepare an Firebase instance by running the command, and enter necessary details. Make sure that you MUST set the public directory path of `app/public`.
```bash
firebase init hosting
```
And finally run the following command to publish the app.
```bash
firebase deploy --only hosting
```
### Deploy Gatsby App onto AWS Amplify ###
First of all, make sure that you've got `Amplify CLI` installed on your local machine.
```bash
npm install -g @aws-amplify/cli
```
Then, configure the Amplify CLI by running the command, and enter your IAM details.
```bash
amplify configure
```
Prepare an Amplify instance by running the command, and enter necessary details. Make sure that you MUST set the source directory path of `app/src`, distribution directory path of `app/public`, and build command of `cd app && npm ci && npm run build && cd ..`.
```bash
amplify init
```
Prepare deployment by running the following command. For now, you SHOULD choose the manual deployment.
```bash
amplify add hosting
```
And finally run the following command to publish the app.
```bash
amplify publish
```
### Deploy Gatsby App onto Azure Static Web App ###
First of all, make sure that you've got `Azure CLI` installed on your local machine. Visit [this page](https://docs.microsoft.com/cli/azure/install-azure-cli?WT.mc_id=dotnet-13835-juyoo) for more detailed installation guide for your OS.
Then, log-in to Azure CLI by running the command.
```bash
az login
```
And finally run the following command to publish the app. It creates an [Azure Static Web App](https://docs.microsoft.com/azure/static-web-apps/overview?WT.mc_id=dotnet-13835-juyoo) instance and deploy the app.
```bash
az staticwebapp create \
-g \
-n \
-l \
-s https://github.com/devkimchi/jamstack-intro-demo \
-b main \
-t \
--app-location "/app" \
--app-artifact-location "public" \
--api-location "" \
```