Skip to content

Commit

Permalink
Merge pull request #25 from NathanTarbert/deployApp
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaiBer authored Nov 16, 2023
2 parents 0e66601 + ada8c3b commit d71ac9a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Binary file added .DS_Store
Binary file not shown.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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?
Expand All @@ -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.
Expand All @@ -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": "<API GATEWAY URL>",
"apiUrl": "<API GATEWAY URL>",
}
```

Expand Down
6 changes: 3 additions & 3 deletions dynamodb.w
Original file line number Diff line number Diff line change
Expand Up @@ -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, "[]");
Expand Down Expand Up @@ -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)}",
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion main.w
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Util {

class Store {
table: ddb.DynamoDBTable;
init() {
new() {
this.table = new ddb.DynamoDBTable(hashKey: "Name") as "Entries";
}

Expand Down

0 comments on commit d71ac9a

Please sign in to comment.