-
Create a Gatsby site.
Use the Gatsby CLI to create a new site, specifying the minimal starter.
# create a new Gatsby site using the minimal starter npm init gatsby
-
Start developing.
Navigate into your new site’s directory and start it up.
cd my-gatsby-site/ npm run develop
-
Open the code and start customizing!
Your site is now running at http://localhost:8000!
Edit
src/pages/index.js
to see your site update in real-time! -
Learn more
Deploy this starter with one click on Gatsby Cloud:
These steps will get this sample HTML application running for you using DigitalOcean App Platform.
Note: Following these steps may result in charges for the use of DigitalOcean services
- You need a DigitalOcean account. If you don't already have one, you can sign up at https://cloud.digitalocean.com/registrations/new
Click this button to deploy the app to the DigitalOcean App Platform. If you are not logged in, you will be prompted to log in with your DigitalOcean account.
Using this button disable the "Auto deploy changes on push" feature as you are using this repo directly. If you wish to try that feature, you will need to make your own copy of this repository.
To make a copy, click the Fork button above and follow the on-screen instructions. In this case, you'll be forking this repo as a starting point for your own app (see GitHub documentation to learn more about forking repos.
After forking the repo, you should now be viewing this README in your own github org (e.g. https://github.com/<your-org>/sample-html
). To deploy the new repo, visit https://cloud.digitalocean.com/apps and click "Create App" or "Launch Your App". Then, select the repository you created and be sure to select the main
branch.
After clicking the "Deploy to DigitalOcean" button or completing the instructions above to fork the repo, follow these steps:
- Select which region you wish to deploy your app to and click Next. The closest region to you should be selected by default. All App Platform apps are routed through a global CDN so this will not affect your app performance, unless it needs to talk to external services.
- On the following screen, leave all the fields as they are and click Next.
- Confirm your Plan settings and how many containers you want to launch and click Launch Basic/Pro App.
- You should see a "Building..." progress indicator. And you can click "Deployments"→"Details" to see more details of the build.
- It can take a few minutes for the build to finish, but you can follow the progress by clicking the "Details" link in the top banner.
- Once the build completes successfully, click the "Live App" link in the header and you should see your running application in a new tab, displaying the home page.