Intro to pulumi
Getting Started
- Install Pulumi
brew install pulumi/tap/pulumi
- Configure AWS Credentials
export AWS_ACCESS_KEY_ID=<YOUR_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<YOUR_SECRET_ACCESS_KEY>
- Create new Pulumi project
mkdir infrastructure && cd infrastructure
pulumi new aws-javascript
- Deploy Application
pulumi up
- Modify the Program
const bucketObject = new aws.s3.BucketObject("index.html", {
bucket: bucket,
source: new pulumi.asset.FileAsset(path.join(__dirname, '../dist/index.html'))
});
pulumi up
- Make it a static website
// Bucket
const bucket = new aws.s3.Bucket("my-bucket", {
website: {
indexDocument: "index.html",
},
});
// Bucket Object
const bucketObject = new aws.s3.BucketObject("index.html", {
acl: "public-read",
contentType: "text/html",
bucket: bucket,
source: new pulumi.asset.FileAsset(path.join(__dirname, '../dist/index.html'))
});
- Expose the S3 URL
exports.bucketEndpoint = pulumi.interpolate`http://${bucket.websiteEndpoint}`;
Vue
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
Customize configuration
See Vite Configuration Reference.
Project Setup
npm install
Compile and Hot-Reload for Development
npm run dev
Compile and Minify for Production
npm run build