Skip to content

Latest commit

 

History

History
188 lines (157 loc) · 9.88 KB

index.md

File metadata and controls

188 lines (157 loc) · 9.88 KB
title description altTitle altDescription
Installation
Ampt lets developers write apps with their favorite tools and JavaScript frameworks, then automatically provisions, manages, and optimizes cloud resources for them.
Get started with Ampt!
Ampt lets developers write apps using their favorite tools, JavaScript frameworks, and npm packages, then automatically provisions, manages, and optimizes cloud resource by inferring requirements from the code.
Installation
1
Install & start the Ampt CLI
Navigate to an empty directory in your terminal and make sure you have Node.js v18+ and npm installed. Then run the following command to install and start Ampt.
> npm i -g @ampt/cli
> ampt
2
Login to Ampt

The CLI will attempt to open a browser window to the Ampt dashboard. If your browser window doesn't open automatically, copy and paste the link provided in the CLI.

In the browser window, sign in or create a new Ampt account.

ampt ⚡

ℹ You must login to proceeed.
ℹ Your browser should open automatically.
ℹ If not, open the following login url:
→ https://ampt.dev/activate?user_code=XXXX-XXXX
ℹ Your confirmation code is: ~~~text-ampt-pink font-bold~XXXX-XXXX~~~
⚠ This code will expire in 15 minutes.
3
Confirm your device
Once signed in, you'll be asked to confirm that the code in the CLI matches the code in the browser.
Device Confirmation
Please confirm this is the code displayed on your Ampt CLI:
XXXX-XXXX
If you did not initiate this action or you do not recognize this device select cancel.
Cancel
Confirm
4
Go through the tutorial
Ampt provides an out-of-the-box interactive tutorial to help new users get accustomed to Ampt workflows. This is optional, but highly recommended.
If you started Ampt in an empty directory, you'll have a chance to use our preconfigured tutorial template. If you started Ampt in an existing project directory, or want to use a template, you can still access the tutorial from the CLI using the tutorial command.
ampt ⚡
? Would you like to start the tutorial?
ℹ You've selected ~~~font-bold~yes~~~.
ℹ Enter a name for your app
⚡ › my-ampt-tutorial▊
5
Create a new app
When started in an empty directory, Ampt will ask if you want to create a new app. Select "Yes" from the menu.
If you want to migrate an existing Node.js project to Ampt, just start the CLI in the project's directory.
ampt ⚡

~~~whitespace-normal pl-5 -indent-5 inline-block~~~~text-ampt-pink~?~~~ Would you like to create a new app?~~~

› Yes
  ~~~text-gray-500~No~~~
6
Select a starter template
Ampt provides a set of preconfigured templates to quickly bootstrap your project.
ampt ⚡
? Would you like to create a new app?
ℹ You've selected ~~~font-bold~yes~~~.
~~~whitespace-normal pl-5 -indent-5 inline-block~ℹ Choose a template to generate.~~~

› JavaScript API (Express)
  ~~~text-gray-500~TypeScript API (Express)~~~
  ~~~text-gray-500~React starter app~~~
  ~~~text-gray-500~Astro Web Store~~~
  ~~~text-gray-500~NextJS Starter Template (v12)~~~
  ~~~text-gray-500~WebSockets starter template~~~
  ~~~text-ampt-pink~...~~~
7
Name your app
The app name will default to your directory name. You can rename it here.
ampt ⚡

ℹ You've selected ~~~font-bold~JavaScript API (Express)~~~.
ℹ Enter a name for your app
⚡ › my-cool-api ▊
8
Start coding!

Ampt generates the template code in your local directory, then spins up and connects to your isolated developer sandbox in the cloud.

Open your project directory in your favorite IDE and just start coding! Every time you save your work, your changes will be synced and deployed to your developer sandbox in less than a second.

Checkout the CLI documentation for more cool things you can do from the terminal. 🚀

ampt ⚡

ℹ You've entered ~~~font-bold~my-cool-api~~~.
~~~whitespace-normal pl-5 -indent-5 inline-block~✔ Successfully generated app ~~~font-bold~my-cool-api~~~ in this directory.~~~

~~~whitespace-normal pl-5 -indent-5 inline-block~✔ Connected to ~~~text-ampt-purple~@org/app/username~~~ ~~~
→ https://~~~italic text-gray-500~{your-unique-url}~~~.ampt.app
⚡ › ▊
Congratulations, now you're Ampt! 😉

Logs will be streamed directly into the interactive shell running in your terminal to give you immediate feedback. Plus, you can manage your parameters, view metrics, browse and update data, access blob storage, and much more using the Ampt Dashboard.