create-singlestoredb-app
Advanced tools
Comparing version 1.0.2 to 1.0.3
const axios = require("axios"); | ||
const API_KEY = | ||
"ad2eab5f1df1e937cdd5dcba3c730991d1559b971d3035f4627d8ba39c3c3b1f"; | ||
const BASE_URL = "https://api.singlestore.com"; | ||
@@ -92,5 +89,3 @@ | ||
} catch (error) { | ||
console.error({ | ||
error: error.response.status + ": " + error.response.data, | ||
}); | ||
throw error | ||
} | ||
@@ -110,5 +105,3 @@ } | ||
} catch (error) { | ||
console.error({ | ||
error: error.response.status + ": " + error.response.data, | ||
}); | ||
throw error | ||
} | ||
@@ -128,5 +121,3 @@ } | ||
} catch (error) { | ||
console.error({ | ||
error: error.response.status + ": " + error.response.data, | ||
}); | ||
throw error; | ||
} | ||
@@ -151,5 +142,3 @@ } | ||
} catch (error) { | ||
console.error({ | ||
error: error.response.status + ": " + error.response.data, | ||
}); | ||
throw error; | ||
} | ||
@@ -172,5 +161,3 @@ } | ||
} catch (error) { | ||
console.error({ | ||
error: error.response.status + ": " + error.response.data, | ||
}); | ||
throw error | ||
} | ||
@@ -194,5 +181,3 @@ } | ||
} catch (error) { | ||
console.error({ | ||
error: error.response.status + ": " + error.response.data, | ||
}); | ||
throw error | ||
} | ||
@@ -199,0 +184,0 @@ } |
@@ -47,6 +47,2 @@ #! /usr/bin/env node | ||
let terminatedThreads = 0; | ||
let endpoint; | ||
let password; | ||
for (let worker of threads) { | ||
@@ -56,9 +52,7 @@ worker.on('error', (err) => { throw err; }); | ||
threads.delete(worker); | ||
terminatedThreads++; | ||
}) | ||
worker.on('message', (msg) => { | ||
if (msg.type === "workspace") { | ||
endpoint = msg.endpoint; | ||
password = msg.password; | ||
if (msg.type === "exit") { | ||
threads.delete(worker); | ||
process.exit(1) | ||
} | ||
@@ -69,6 +63,2 @@ console.log(msg); | ||
if (terminatedThreads === 2) { | ||
await setupConnection(endpoint, password); | ||
} | ||
} else { | ||
@@ -104,3 +94,3 @@ // This code is executed in the worker and not in the main thread. | ||
} | ||
try { | ||
@@ -128,5 +118,12 @@ execSync(`npm install`, { | ||
(async () => { | ||
console.log("start creating your workspace...") | ||
const { endpoint, password } = await createWorkspace.create(workerData.appName, workerData.key); | ||
parentPort.postMessage({type: workerData.type, endpoint, password}); | ||
try { | ||
console.log("start creating your workspace...") | ||
const { endpoint, password } = await createWorkspace.create(workerData.appName, workerData.key); | ||
await setupConnection(endpoint, password); | ||
parentPort.postMessage('Your workspace is ready!'); | ||
} catch (error) { | ||
console.error(`Error ${error.response.status}: ${error.response.data}`) | ||
parentPort.postMessage({type: "exit"}) | ||
process.exit(1) | ||
} | ||
})(); | ||
@@ -133,0 +130,0 @@ |
{ | ||
"name": "create-singlestoredb-app", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A boilerplate to build a web application connected with SingleStoreDB.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -23,2 +23,2 @@ # create-singlestoredb-app | ||
The app created by this tool is a React + TypeScript + Express + SingleStoreDB Demo app. The app is started with a [boilerplate](https://github.com/covalence-io/barebones-react-typescript-express), and you can count with packages like MaterialUI, Formik, YUP, react-chartjs-2 and others. We have a REST API integrated with SingleStoreDB structure done for you. It has everything already configurated and integrated so you can start implementing your idea right away. Happy coding! | ||
The app created by this tool is a React + TypeScript + Express + SingleStoreDB Demo app. The app is started with a [boilerplate](https://github.com/singlestore-labs/singlestore-app-boilerplate), and you can count with packages like MaterialUI, Formik, YUP, react-chartjs-2 and others. We have a REST API integrated with SingleStoreDB structure done for you. It has everything already configurated and integrated so you can start implementing your idea right away. Happy coding! |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10873
262