Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed the breaking build constructor variable from init to new . Also added npm run build to the steps #25

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading