From b2eec9df57bdff3963ad8ec9a7a9eadf8c3bc839 Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 00:43:47 -0800 Subject: [PATCH 1/9] feat: updated JS-MongoDB-Mongoose-NoAuth-Template --- .../JS-MongoDB-Mongoose-NoAuth-Template/.gitignore | 3 ++- .../JS-MongoDB-Mongoose-NoAuth-Template/package.json | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/.gitignore index 7af7f047..221391cb 100644 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ +.vscode /node_modules -.env \ No newline at end of file +.env diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json index 2f176433..bbcc2e65 100644 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json @@ -1,5 +1,5 @@ { - "name": "yonode-api", + "name": "js-mongodb-mongoose", "version": "0.0.0", "private": true, "main": "./src/app.js", @@ -26,7 +26,7 @@ "uuidv4": "^6.2.13" }, "devDependencies": { - "yonode": "^0.7.0", + "yonode": "^0.6.0", "nodemon": "^3.0.1" } -} +} \ No newline at end of file From 96e40d3fa1f89cc7b3d7647ed53e89142bd33d4e Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 00:59:20 -0800 Subject: [PATCH 2/9] feat: added JS-MongoDB-Prisma-NoAuth-Template and changed packeg of JS-MongoDB-Mongoose-NoAuth-Template --- .../JS-MongoDB-Mongoose-NoAuth-Template/package.json | 4 ++-- .../JS-MongoDB-Prisma-NoAuth-Template/.gitignore | 5 ++++- .../JS-MongoDB-Prisma-NoAuth-Template/package.json | 2 +- .../JS-MongoDB-Prisma-NoAuth-Template/src/app.js | 7 ++++--- .../JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json index bbcc2e65..352ff46e 100644 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json @@ -1,5 +1,5 @@ { - "name": "js-mongodb-mongoose", + "name": "yonode-api", "version": "0.0.0", "private": true, "main": "./src/app.js", @@ -29,4 +29,4 @@ "yonode": "^0.6.0", "nodemon": "^3.0.1" } -} \ No newline at end of file +} diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/.gitignore index 30bc1627..72eae3c0 100644 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/.gitignore @@ -1 +1,4 @@ -/node_modules \ No newline at end of file +.vscode +/node_modules +.env + diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/package.json b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/package.json index 604e4b57..005e2330 100644 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/package.json @@ -26,7 +26,7 @@ "uuidv4": "^6.2.13" }, "devDependencies": { - "yonode": "^0.7.0", + "yonode": "^0.6.0", "nodemon": "^3.0.1", "prisma": "^5.9.1" } diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/app.js index fb7765ef..d02ae925 100644 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/app.js @@ -1,16 +1,17 @@ // import the packages import express from "express"; +import chalk from "chalk"; -//import your files +// import your files import { port } from "./config/initial.config.js"; -import chalk from "chalk"; -// Initializing the app +// initializing the app const app = express(); app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js index 6db841b3..2c054c51 100644 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js @@ -1,4 +1,5 @@ import express from "express"; const routerName = express.Router(); -export default routerName; \ No newline at end of file + +export default routerName; From 35c583a20f20ed70fdad03176d5c6538048dd28d Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 01:18:16 -0800 Subject: [PATCH 3/9] feat: udated JS-MongoDB-TypeORM-NoAuth-Template --- .../JS-MongoDB-TypeORM-NoAuth-Template/package.json | 2 +- .../JS-MongoDB-TypeORM-NoAuth-Template/src/app.js | 1 + .../src/config/db.config.js | 8 ++------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/package.json b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/package.json index e5d95a66..ddaa29e9 100644 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/package.json @@ -28,7 +28,7 @@ "typeorm": "0.3.20" }, "devDependencies": { - "yonode": "^0.7.0", + "yonode": "^0.6.0", "nodemon": "^3.0.1" } } diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/app.js index 16edc347..063906f9 100644 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/app.js @@ -12,6 +12,7 @@ app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/db.config.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/db.config.js index 26cb469d..5dbbe19b 100644 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/db.config.js +++ b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/db.config.js @@ -13,14 +13,10 @@ const AppDataSource = new DataSource({ AppDataSource.initialize() .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); + console.log(`${chalk.green.bold('Connected')} to the database`); }) .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) + console.log(`${chalk.red.bold('Error')} connecting to database`, error); ); export default AppDataSource; From 727e8fc68c37b5a5344ee6dcc248017006f7a524 Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 01:24:23 -0800 Subject: [PATCH 4/9] feat: updated JS-MySQL-Prisma-NoAuth-Template Co-Authored-By: Mr Sharafdin <83120892+isasharafdin@users.noreply.github.com> --- .../JS-MySQL-Prisma-NoAuth-Template/.gitignore | 4 +++- .../JS-MySQL-Prisma-NoAuth-Template/src/app.js | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/.gitignore index 30bc1627..221391cb 100644 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/.gitignore @@ -1 +1,3 @@ -/node_modules \ No newline at end of file +.vscode +/node_modules +.env diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/app.js index fb7765ef..31f5f275 100644 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/app.js @@ -1,9 +1,9 @@ // import the packages import express from "express"; +import chalk from "chalk"; -//import your files +// import your files import { port } from "./config/initial.config.js"; -import chalk from "chalk"; // Initializing the app const app = express(); @@ -11,6 +11,7 @@ app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); From 181eb839048a4aa402019d67d8f9abce6e25c4ee Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 01:27:50 -0800 Subject: [PATCH 5/9] feat: JS-MySQL-Sequelize-NoAuth-Template Co-Authored-By: Mr Sharafdin <83120892+isasharafdin@users.noreply.github.com> --- .../JS-MySQL-Sequelize-NoAuth-Template/.gitignore | 1 + .../JS-MySQL-Sequelize-NoAuth-Template/src/app.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/.gitignore index 3713ac14..221391cb 100644 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ .vscode /node_modules +.env diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/app.js index 319ceaa7..c83b05a9 100644 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/app.js @@ -14,6 +14,7 @@ app.use(express.json()); // rest of your code here +// database connection connectDB() app.listen(port, () => { From f8069c1e98c6339cc173e8c6f435251fe2263d7d Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 01:30:17 -0800 Subject: [PATCH 6/9] feat: updated JS-MySQL-TypeORM-NoAuth-Template Co-Authored-By: Mr Sharafdin <83120892+isasharafdin@users.noreply.github.com> --- .../JS-MySQL-TypeORM-NoAuth-Template/.gitignore | 4 ++-- .../src/config/db.config.js | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/.gitignore index e8d451db..5a30af86 100644 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/.gitignore @@ -1,3 +1,3 @@ -.vscode/ +.vscode node_modules/ - +.env diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/db.config.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/db.config.js index 341bd466..b0bb27c8 100644 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/db.config.js +++ b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/db.config.js @@ -12,14 +12,10 @@ const AppDataSource = new DataSource({ AppDataSource.initialize() .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); + console.log(`${chalk.green.bold('Connected')} to the database`); }) .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) + console.log(`${chalk.red.bold('Error')} connecting to database`, error); ); export default AppDataSource; From bd98295d908e5a9a859d30b2c7d1b6757992ceb3 Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 01:33:19 -0800 Subject: [PATCH 7/9] feat: updated JS-PostgreSQL-Sequelize-NoAuth-Template Co-Authored-By: Mr Sharafdin <83120892+isasharafdin@users.noreply.github.com> --- .../JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore | 1 + .../JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore index 3713ac14..221391cb 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ .vscode /node_modules +.env diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js index 319ceaa7..c83b05a9 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js @@ -14,6 +14,7 @@ app.use(express.json()); // rest of your code here +// database connection connectDB() app.listen(port, () => { From 0dff088710c22b3f707743d51598361892ddad51 Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 01:35:40 -0800 Subject: [PATCH 8/9] feat: updated JS-PostgreSQL-Prisma-NoAuth-Template Co-Authored-By: Mr Sharafdin <83120892+isasharafdin@users.noreply.github.com> --- .../JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore | 3 ++- .../JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore index 7af7f047..221391cb 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ +.vscode /node_modules -.env \ No newline at end of file +.env diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js index fb7765ef..31f5f275 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js @@ -1,9 +1,9 @@ // import the packages import express from "express"; +import chalk from "chalk"; -//import your files +// import your files import { port } from "./config/initial.config.js"; -import chalk from "chalk"; // Initializing the app const app = express(); @@ -11,6 +11,7 @@ app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); From 9e450dd7846c2e784be8541c4056a1015d1b233f Mon Sep 17 00:00:00 2001 From: Abdinasir Mursal Date: Mon, 26 Feb 2024 01:38:29 -0800 Subject: [PATCH 9/9] feat: updated JS-PostgreSQL-TypeORM-NoAuth-Template Co-Authored-By: Mr Sharafdin <83120892+isasharafdin@users.noreply.github.com> --- .../JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore | 3 ++- .../JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js | 5 +++-- .../src/config/db.config.js | 8 ++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore index 8d056c8e..5a30af86 100644 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ -.vscode/ +.vscode node_modules/ +.env diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js index 4a832b49..b93c5b2f 100644 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js @@ -2,16 +2,17 @@ import express from "express"; import chalk from "chalk"; -//import your files +// import your files import { port } from "./config/initial.config.js"; import "./config/db.config.js"; -//initializing the app +// initializing the app const app = express(); app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/db.config.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/db.config.js index 7a3731a3..0fe7e11a 100644 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/db.config.js +++ b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/db.config.js @@ -12,14 +12,10 @@ const AppDataSource = new DataSource({ AppDataSource.initialize() .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); + console.log(`${chalk.green.bold('Connected')} to the database`); }) .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) + console.log(`${chalk.red.bold('Error')} connecting to database`, error); ); export default AppDataSource;