Skip to content

Commit

Permalink
feat: update template projects to stable golem-js 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SewerynKras committed Jul 2, 2024
1 parent 72a4c98 commit 5ee20c7
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 24 deletions.
2 changes: 1 addition & 1 deletion data/project-templates/js-node-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"application"
],
"dependencies": {
"@golem-sdk/golem-js": "^3.0.0-beta.51",
"@golem-sdk/golem-js": "^3.0.0",
"dotenv": "^16.4.5"
}
}
7 changes: 4 additions & 3 deletions data/project-templates/js-node-esm/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const order = {
workload: { imageTag: "golem/alpine:latest" },
},
market: {
// 5 minutes
rentHours: 5 / 60,
// 15 minutes
rentHours: 15 / 60,
pricing: {
model: "linear",
maxStartPrice: 0.5,
Expand All @@ -24,9 +24,10 @@ const order = {
await glm.connect();
// create a pool that can grow up to 3 rentals at the same time
const pool = await glm.manyOf({
concurrency: 3,
poolSize: 3,
order,
});
console.log("Starting work on Golem!");
await Promise.allSettled([
pool.withRental(async (rental) =>
rental
Expand Down
2 changes: 1 addition & 1 deletion data/project-templates/js-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"application"
],
"dependencies": {
"@golem-sdk/golem-js": "^3.0.0-beta.51",
"@golem-sdk/golem-js": "^3.0.0",
"dotenv": "^16.4.5"
}
}
7 changes: 4 additions & 3 deletions data/project-templates/js-node/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const order = {
workload: { imageTag: "golem/alpine:latest" },
},
market: {
// 5 minutes
rentHours: 5 / 60,
// 15 minutes
rentHours: 15 / 60,
pricing: {
model: "linear",
maxStartPrice: 0.5,
Expand All @@ -24,9 +24,10 @@ const order = {
await glm.connect();
// create a pool that can grow up to 3 rentals at the same time
const pool = await glm.manyOf({
concurrency: 3,
poolSize: 3,
order,
});
console.log("Starting work on Golem!");
await Promise.allSettled([
pool.withRental(async (rental) =>
rental
Expand Down
2 changes: 1 addition & 1 deletion data/project-templates/react-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@golem-sdk/golem-js": "^3.0.0-beta.51",
"@golem-sdk/golem-js": "^3.0.0",
"@golem-sdk/react": "^3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion data/project-templates/react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@golem-sdk/golem-js": "^3.0.0-beta.51",
"@golem-sdk/golem-js": "^3.0.0",
"@golem-sdk/react": "^3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion data/project-templates/ts-node-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"application"
],
"dependencies": {
"@golem-sdk/golem-js": "^3.0.0-beta.51",
"@golem-sdk/golem-js": "^3.0.0",
"dotenv": "^16.4.5"
}
}
7 changes: 4 additions & 3 deletions data/project-templates/ts-node-esm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const order: MarketOrderSpec = {
workload: { imageTag: "golem/alpine:latest" },
},
market: {
// 5 minutes
rentHours: 5 / 60,
// 15 minutes
rentHours: 15 / 60,
pricing: {
model: "linear",
maxStartPrice: 0.5,
Expand All @@ -24,9 +24,10 @@ const order: MarketOrderSpec = {
await glm.connect();
// create a pool that can grow up to 3 rentals at the same time
const pool = await glm.manyOf({
concurrency: 3,
poolSize: 3,
order,
});
console.log("Starting work on Golem!");
await Promise.allSettled([
pool.withRental(async (rental) =>
rental
Expand Down
2 changes: 1 addition & 1 deletion data/project-templates/ts-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"application"
],
"dependencies": {
"@golem-sdk/golem-js": "^3.0.0-beta.51",
"@golem-sdk/golem-js": "^3.0.0",
"dotenv": "^16.4.5"
}
}
7 changes: 4 additions & 3 deletions data/project-templates/ts-node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const order: MarketOrderSpec = {
workload: { imageTag: "golem/alpine:latest" },
},
market: {
// 5 minutes
rentHours: 5 / 60,
// 15 minutes
rentHours: 15 / 60,
pricing: {
model: "linear",
maxStartPrice: 0.5,
Expand All @@ -24,9 +24,10 @@ const order: MarketOrderSpec = {
await glm.connect();
// create a pool that can grow up to 3 rentals at the same time
const pool = await glm.manyOf({
concurrency: 3,
poolSize: 3,
order,
});
console.log("Starting work on Golem!");
await Promise.allSettled([
pool.withRental(async (rental) =>
rental
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ee20c7

Please sign in to comment.