diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..298c87e Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index dbc68f5..00858ae 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Battle of the Bites! -***Get ready to indulge your taste buds and crown the ultimate culinary champion in Battle of the Bites!*** 🍔🍕🍣 +**_Get ready to indulge your taste buds and crown the ultimate culinary champion in Battle of the Bites!_** 🍔🍕🍣 Swipe, vote, and savor the showdown as iconic dishes from around the world go head-to-head in a gastronomic clash like no other. Will pizza outflavor sushi? Can burgers grill their way to victory over tacos? @@ -19,6 +19,7 @@ Inspired by https://eloeverything.co/. To deploy your own copy of the app, first make sure you have AWS credentials configured in your terminal for the account and region you want to deploy to. Then: + 1. Clone this git repository. 2. Compile the project to AWS (with Terraform) using `wing compile -t tf-aws main.w`. 3. Run `cd target/main.tfaws` to find your deployment artifacts. @@ -29,11 +30,12 @@ Then: 1. Clone this git repository. 2. Run `cd website`. 3. Run `npm install`. -4. Create a file at `website/public/config.json` that contains the following: +4. Run `npm run build`, +5. Create a file at `website/public/config.json` that contains the following: ```json { - "apiUrl": "", + "apiUrl": "", } ``` diff --git a/dynamodb.w b/dynamodb.w index 6726c01..8654e49 100644 --- a/dynamodb.w +++ b/dynamodb.w @@ -33,7 +33,7 @@ pub class DynamoDBTableSim { key: str; data: cloud.Bucket; - init(props: DynamoDBTableProps) { + new(props: DynamoDBTableProps) { this.key = "data.json"; this.data = new cloud.Bucket(); this.data.addObject(this.key, "[]"); @@ -76,7 +76,7 @@ pub class DynamoDBTableAws { pub table: tfaws.dynamodbTable.DynamodbTable; tableName: str; hashKey: str; - init(props: DynamoDBTableProps) { + new(props: DynamoDBTableProps) { this.hashKey = props.hashKey; this.table = new tfaws.dynamodbTable.DynamodbTable( name: "${this.node.id}-${this.node.addr.substring(this.node.addr.length - 8)}", @@ -171,7 +171,7 @@ pub class DynamoDBTable { tableSim: DynamoDBTableSim?; tableAws: DynamoDBTableAws?; - init(props: DynamoDBTableProps) { + new(props: DynamoDBTableProps) { let target = util.env("WING_TARGET"); if target == "sim" { this.tableSim = new DynamoDBTableSim(props); diff --git a/main.w b/main.w index 0a4ebab..c29ff82 100644 --- a/main.w +++ b/main.w @@ -56,7 +56,7 @@ class Util { class Store { table: ddb.DynamoDBTable; - init() { + new() { this.table = new ddb.DynamoDBTable(hashKey: "Name") as "Entries"; }