From b042339300a13bbff0c625a134bae81022d74152 Mon Sep 17 00:00:00 2001 From: isasharafdin Date: Tue, 13 Feb 2024 19:06:09 +0300 Subject: [PATCH] updated yonode templates --- .../JS-MongoDB-Mongoose-NoAuth-Template | 1 + .../JS-MongoDB-Mongoose-NoAuth/.env | 17 ---------- .../JS-MongoDB-Mongoose-NoAuth/.gitignore | 2 -- .../JS-MongoDB-Mongoose-NoAuth/README.md | 24 -------------- .../JS-MongoDB-Mongoose-NoAuth/package.json | 31 ------------------ .../JS-MongoDB-Mongoose-NoAuth/src/app.js | 20 ------------ .../src/config/db.config.js | 19 ----------- .../src/config/initial.config.js | 7 ---- .../src/controllers/controller.js | 7 ---- .../src/middlewares/middleware.js | 0 .../src/models/model.js | 11 ------- .../src/routes/router.js | 5 --- .../src/utils/utils.js | 0 .../JS-MongoDB-Prisma-NoAuth-Template | 1 + .../JS-MongoDB-Prisma-NoAuth/.env | 14 -------- .../JS-MongoDB-Prisma-NoAuth/.gitignore | 1 - .../.vscode/settings.json | 5 --- .../JS-MongoDB-Prisma-NoAuth/README.md | 24 -------------- .../JS-MongoDB-Prisma-NoAuth/package.json | 32 ------------------- .../prisma/schema.prisma | 16 ---------- .../JS-MongoDB-Prisma-NoAuth/src/app.js | 15 --------- .../src/config/initial.config.js | 5 --- .../src/controllers/controller.js | 7 ---- .../src/middlewares/middleware.js | 0 .../src/routes/router.js | 4 --- .../JS-MongoDB-TypeORM-NoAuth-Template | 1 + .../JS-MongoDB-TypeORM-NoAuth/.env | 17 ---------- .../JS-MongoDB-TypeORM-NoAuth/.gitignore | 3 -- .../JS-MongoDB-TypeORM-NoAuth/README.md | 25 --------------- .../JS-MongoDB-TypeORM-NoAuth/package.json | 32 ------------------- .../JS-MongoDB-TypeORM-NoAuth/src/app.js | 15 --------- .../src/config/db.config.js | 26 --------------- .../src/config/initial.config.js | 7 ---- .../src/controllers/controller.js | 7 ---- .../src/entity/entity.js | 14 -------- .../src/middlewares/middleware.js | 0 .../src/routes/router.js | 5 --- .../src/utils/utils.js | 0 .../JS-MySQL-Prisma-NoAuth-Template | 1 + .../JS-MySQL-Prisma-NoAuth/.env | 14 -------- .../JS-MySQL-Prisma-NoAuth/.gitignore | 1 - .../JS-MySQL-Prisma-NoAuth/README.md | 24 -------------- .../JS-MySQL-Prisma-NoAuth/package.json | 32 ------------------- .../prisma/schema.prisma | 15 --------- .../JS-MySQL-Prisma-NoAuth/src/app.js | 15 --------- .../src/config/initial.config.js | 5 --- .../src/controllers/controller.js | 7 ---- .../src/middlewares/middleware.js | 0 .../src/routes/router.js | 5 --- .../JS-MySQL-Sequelize-NoAuth-Template | 1 + .../JS-MySQL-Sequelize-NoAuth/.env | 17 ---------- .../JS-MySQL-Sequelize-NoAuth/.gitignore | 2 -- .../JS-MySQL-Sequelize-NoAuth/README.md | 25 --------------- .../JS-MySQL-Sequelize-NoAuth/package.json | 31 ------------------ .../JS-MySQL-Sequelize-NoAuth/src/app.js | 20 ------------ .../src/config/db.config.js | 18 ----------- .../src/config/initial.config.js | 6 ---- .../src/controllers/controller.js | 7 ---- .../src/middlewares/middleware.js | 0 .../src/models/model.js | 11 ------- .../src/models/models.js | 7 ---- .../src/routes/router.js | 5 --- .../src/utils/utils.js | 0 .../JS-MySQL-TypeORM-NoAuth-Template | 1 + .../JS-MySQL-TypeORM-NoAuth/.env | 17 ---------- .../JS-MySQL-TypeORM-NoAuth/.gitignore | 3 -- .../JS-MySQL-TypeORM-NoAuth/README.md | 25 --------------- .../JS-MySQL-TypeORM-NoAuth/package.json | 32 ------------------- .../JS-MySQL-TypeORM-NoAuth/src/app.js | 17 ---------- .../src/config/db.config.js | 25 --------------- .../src/config/initial.config.js | 7 ---- .../src/controllers/controller.js | 7 ---- .../src/entity/entity.js | 14 -------- .../src/middlewares/middleware.js | 0 .../src/routes/router.js | 5 --- .../src/utils/utils.js | 0 .../JS-PostgreSQL-Prisma-NoAuth-Template | 1 + .../JS-PostgreSQL-Prisma-NoAuth/.env | 14 -------- .../JS-PostgreSQL-Prisma-NoAuth/.gitignore | 2 -- .../JS-PostgreSQL-Prisma-NoAuth/README.md | 24 -------------- .../JS-PostgreSQL-Prisma-NoAuth/package.json | 32 ------------------- .../prisma/schema.prisma | 15 --------- .../JS-PostgreSQL-Prisma-NoAuth/src/app.js | 15 --------- .../src/config/initial.config.js | 5 --- .../src/controllers/controller.js | 7 ---- .../src/middlewares/middleware.js | 0 .../src/routes/router.js | 5 --- .../JS-PostgreSQL-Sequelize-NoAuth-Template | 1 + .../JS-PostgreSQL-Sequelize-NoAuth/.env | 17 ---------- .../JS-PostgreSQL-Sequelize-NoAuth/.gitignore | 2 -- .../JS-PostgreSQL-Sequelize-NoAuth/README.md | 25 --------------- .../package.json | 31 ------------------ .../JS-PostgreSQL-Sequelize-NoAuth/src/app.js | 20 ------------ .../src/config/db.config.js | 18 ----------- .../src/config/initial.config.js | 6 ---- .../src/controllers/controller.js | 7 ---- .../src/middlewares/middleware.js | 0 .../src/models/model.js | 7 ---- .../src/models/models.js | 7 ---- .../src/routes/router.js | 5 --- .../src/utils/utils.js | 0 .../JS-PostgreSQL-TypeORM-NoAuth-Template | 1 + .../JS-PostgreSQL-TypeORM-NoAuth/.env | 17 ---------- .../JS-PostgreSQL-TypeORM-NoAuth/.gitignore | 2 -- .../JS-PostgreSQL-TypeORM-NoAuth/README.md | 25 --------------- .../JS-PostgreSQL-TypeORM-NoAuth/package.json | 32 ------------------- .../JS-PostgreSQL-TypeORM-NoAuth/src/app.js | 16 ---------- .../src/config/db.config.js | 25 --------------- .../src/config/initial.config.js | 7 ---- .../src/controllers/controller.js | 7 ---- .../src/entity/entity.js | 14 -------- .../src/middlewares/middleware.js | 0 .../src/routes/router.js | 5 --- .../src/utils/utils.js | 0 114 files changed, 9 insertions(+), 1250 deletions(-) create mode 160000 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/config/db.config.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/models/model.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/routes/router.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/utils/utils.js create mode 160000 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.vscode/settings.json delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/prisma/schema.prisma delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/routes/router.js create mode 160000 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/config/db.config.js delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/entity/entity.js delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/routes/router.js delete mode 100644 packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/utils/utils.js create mode 160000 packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/prisma/schema.prisma delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/routes/router.js create mode 160000 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/config/db.config.js delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/models/model.js delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/models/models.js delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/routes/router.js delete mode 100644 packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/utils/utils.js create mode 160000 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/config/db.config.js delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/entity/entity.js delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/routes/router.js delete mode 100644 packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/utils/utils.js create mode 160000 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/prisma/schema.prisma delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/routes/router.js create mode 160000 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/config/db.config.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/models/model.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/models/models.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/routes/router.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/utils/utils.js create mode 160000 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/.env delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/.gitignore delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/README.md delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/package.json delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/app.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/config/db.config.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/config/initial.config.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/controllers/controller.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/entity/entity.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/middlewares/middleware.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/routes/router.js delete mode 100644 packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/utils/utils.js diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template new file mode 160000 index 00000000..8f1029ba --- /dev/null +++ b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit 8f1029ba43d86ad35c9b9057ce90864918c8a9e6 diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/.env b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/.env deleted file mode 100644 index a6c782b2..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/.env +++ /dev/null @@ -1,17 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. - -SERVER_PORT= - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database. This should include the protocol, username, password, and host as applicable. - -DATABASE_URL= - -# Specify the name of the database to which the application will connect. -# If not specified, the default database 'yonodeDB' will be used. - -DATABASE_NAME= diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/.gitignore b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/.gitignore deleted file mode 100644 index 7af7f047..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -.env \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/README.md b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/README.md deleted file mode 100644 index b396b8f5..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Yonode + MongoDB with Mongoose - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -```bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server -``` -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/package.json b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/package.json deleted file mode 100644 index f1730451..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "bcrypt": "^5.1.1", - "chalk": "5.3.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "dotenv": "^16.3.1", - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^7.1.5", - "helmet": "^7.0.0", - "joi": "^17.10.0", - "jsonwebtoken": "^9.0.2", - "mongoose": "^8.1.1", - "morgan": "^1.10.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13" - }, - "devDependencies": { - "nodemon": "^3.0.1" - } -} diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/app.js b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/app.js deleted file mode 100644 index 7f8d6ea4..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/app.js +++ /dev/null @@ -1,20 +0,0 @@ -// import the packages -import express from 'express'; -import chalk from "chalk"; - -// import your files -import { port } from './config/initial.config.js'; -import connectDB from './config/db.config.js'; - -// Initializing the app -const app = express(); - -// rest of your code here - - -// database connection -connectDB(); - -app.listen(port, () => { - console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); -}); diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/config/db.config.js b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/config/db.config.js deleted file mode 100644 index 9c431071..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/config/db.config.js +++ /dev/null @@ -1,19 +0,0 @@ -import mongoose from "mongoose"; -import { dbName, dbUrl } from "./initial.config.js"; -import chalk from "chalk"; - -const connectDB = async () => { - try { - await mongoose.connect(dbUrl, { - useNewUrlParser: true, - useUnifiedTopology: true, - dbName - }); - console.log(`${chalk.green.bold('Connected')} to the database`); - } catch (error) { - console.log(`${chalk.red.bold('Error')} connecting to database`, error); - process.exit(1); - } -}; - -export default connectDB; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/config/initial.config.js b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/config/initial.config.js deleted file mode 100644 index e70683cf..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; -export const dbUrl = process.env.DATABASE_URL; -export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/controllers/controller.js deleted file mode 100644 index 8149fc54..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -}; diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/models/model.js b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/models/model.js deleted file mode 100644 index 96896914..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/models/model.js +++ /dev/null @@ -1,11 +0,0 @@ -import mongoose from "mongoose"; - -const { Schema, model } = mongoose; - -const schemaName = new Schema({ - -}); - -const modelName = model("modelName", schemaName); - -export default modelName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/routes/router.js deleted file mode 100644 index 18b49770..00000000 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/routes/router.js +++ /dev/null @@ -1,5 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); - -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/utils/utils.js b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth/src/utils/utils.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template new file mode 160000 index 00000000..5ce24e1c --- /dev/null +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit 5ce24e1cd553bed675e3fd14868c6877df90d754 diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.env b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.env deleted file mode 100644 index aa1c4e85..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.env +++ /dev/null @@ -1,14 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. - -SERVER_PORT= - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database, This should include the protocol, username, password, host, port, and database name as applicable. - -# Format: protocol://username:password@host:port/databaseName - -DATABASE_URL= diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.gitignore b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.gitignore deleted file mode 100644 index 30bc1627..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.vscode/settings.json b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.vscode/settings.json deleted file mode 100644 index 30e8d954..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cSpell.words": [ - "datasource" - ] -} \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/README.md b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/README.md deleted file mode 100644 index 56e9a3f0..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Yonode + MongoDB with Prisma - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -```bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server -``` -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/package.json b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/package.json deleted file mode 100644 index 22943138..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "@prisma/client": "^5.9.1", - "bcrypt": "^5.1.1", - "chalk": "^5.3.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "dotenv": "^16.4.1", - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^7.1.5", - "helmet": "^7.1.0", - "joi": "^17.12.1", - "jsonwebtoken": "^9.0.2", - "morgan": "^1.10.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13" - }, - "devDependencies": { - "nodemon": "^3.0.1", - "prisma": "^5.9.1" - } -} diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/prisma/schema.prisma b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/prisma/schema.prisma deleted file mode 100644 index b648fbc7..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/prisma/schema.prisma +++ /dev/null @@ -1,16 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" -} - -datasource db { - provider = "mongodb" - url = env("DATABASE_URL") -} - -model modelName { - id String @id @default(auto()) @map("_id") @db.ObjectId -} - diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/app.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/app.js deleted file mode 100644 index e9b49330..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/app.js +++ /dev/null @@ -1,15 +0,0 @@ -// import the packages -import express from "express"; - -//import your files -import { port } from "./config/initial.config.js"; -import chalk from "chalk"; - -// Initializing the app -const app = express(); - -// 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/src/config/initial.config.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/config/initial.config.js deleted file mode 100644 index 2086eceb..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,5 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/controllers/controller.js deleted file mode 100644 index 6b230749..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -}; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/routes/router.js deleted file mode 100644 index 6db841b3..00000000 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth/src/routes/router.js +++ /dev/null @@ -1,4 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template new file mode 160000 index 00000000..45a8fce4 --- /dev/null +++ b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit 45a8fce402ea9bb9056ff9e46f1c7ea53c98a73d diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/.env b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/.env deleted file mode 100644 index 155f83bd..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/.env +++ /dev/null @@ -1,17 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. -SERVER_PORT= # Default: 8000 - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database. This should include the protocol, username, password, and host as applicable. -# Do not include the database name here if it is intended to be specified separately. -DATABASE_URL= - -# Specify the name of the database to which the application will connect. -# If not specified, the default database 'yonodeDB' will be used. -DATABASE_NAME= # Default: yonodeDB - -# Please replace the placeholders (, , and ) with your specific configuration values. diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/.gitignore b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/.gitignore deleted file mode 100644 index a044b4e8..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.vscode/ -node_modules/ -.env diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/README.md b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/README.md deleted file mode 100644 index 9dec309c..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Yonode + MongoDB with TypeORM - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -```bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server -``` -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! - diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/package.json b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/package.json deleted file mode 100644 index f98616b7..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^6.10.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "jsonwebtoken": "^9.0.2", - "dotenv": "^16.3.1", - "bcrypt": "^5.1.1", - "joi": "^17.10.0", - "chalk": "5.3.0", - "morgan": "^1.10.0", - "helmet": "^7.0.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13", - "reflect-metadata": "^0.1.13", - "typeorm": "0.3.20" - }, - "devDependencies": { - "nodemon": "^3.0.1" - } -} diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/app.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/app.js deleted file mode 100644 index 24cbabd5..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/app.js +++ /dev/null @@ -1,15 +0,0 @@ -// import the packages -import express from "express"; -import { port } from "./config/initial.config.js"; - -//import your files -import "./config/db.config.js"; - -//Initializing your app -const app = express(); - -// 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/src/config/db.config.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/config/db.config.js deleted file mode 100644 index 6c432170..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/config/db.config.js +++ /dev/null @@ -1,26 +0,0 @@ -import "reflect-metadata"; -import { DataSource } from "typeorm"; -import { dbName, dbURL } from "./initial.config.js"; -import chalk from "chalk"; - -const AppDataSource = new DataSource({ - type: "mongodb", - url: dbURL, - database: dbName, - entities: ["../entity/**/*.js"], - synchronize: true, -}); - -AppDataSource.initialize() - .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); - }) - .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) - ); - -export default AppDataSource; diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/config/initial.config.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/config/initial.config.js deleted file mode 100644 index e70683cf..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; -export const dbUrl = process.env.DATABASE_URL; -export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/controllers/controller.js deleted file mode 100644 index e641c1a7..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -}; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/entity/entity.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/entity/entity.js deleted file mode 100644 index 78e8d4dc..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/entity/entity.js +++ /dev/null @@ -1,14 +0,0 @@ -import { EntitySchema } from "typeorm"; - -const schemaName = new EntitySchema({ - name: "schemaName", - tableName: "tableName", - columns: { - id: { - primary: true, - type: "int", - generated: true, - }, - }, -}); -export default schemaName; diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/routes/router.js deleted file mode 100644 index 18b49770..00000000 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/routes/router.js +++ /dev/null @@ -1,5 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); - -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/utils/utils.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth/src/utils/utils.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template new file mode 160000 index 00000000..263a3d00 --- /dev/null +++ b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit 263a3d00ac60aa4864238aa96d5fae96b9ef3c1d diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/.env b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/.env deleted file mode 100644 index aa1c4e85..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/.env +++ /dev/null @@ -1,14 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. - -SERVER_PORT= - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database, This should include the protocol, username, password, host, port, and database name as applicable. - -# Format: protocol://username:password@host:port/databaseName - -DATABASE_URL= diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/.gitignore b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/.gitignore deleted file mode 100644 index 30bc1627..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/README.md b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/README.md deleted file mode 100644 index 8040b624..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Yonode + MySQL with Prisma - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server - -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/package.json b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/package.json deleted file mode 100644 index 22943138..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "@prisma/client": "^5.9.1", - "bcrypt": "^5.1.1", - "chalk": "^5.3.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "dotenv": "^16.4.1", - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^7.1.5", - "helmet": "^7.1.0", - "joi": "^17.12.1", - "jsonwebtoken": "^9.0.2", - "morgan": "^1.10.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13" - }, - "devDependencies": { - "nodemon": "^3.0.1", - "prisma": "^5.9.1" - } -} diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/prisma/schema.prisma b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/prisma/schema.prisma deleted file mode 100644 index 2fbd6b58..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/prisma/schema.prisma +++ /dev/null @@ -1,15 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" -} - -datasource db { - provider = "mysql" - url = env("DATABASE_URL") -} - -model modelName { - id Int @id @default(autoincrement()) -} \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/app.js b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/app.js deleted file mode 100644 index e9b49330..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/app.js +++ /dev/null @@ -1,15 +0,0 @@ -// import the packages -import express from "express"; - -//import your files -import { port } from "./config/initial.config.js"; -import chalk from "chalk"; - -// Initializing the app -const app = express(); - -// 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-MySQL-Prisma-NoAuth/src/config/initial.config.js b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/config/initial.config.js deleted file mode 100644 index 2086eceb..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,5 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/controllers/controller.js deleted file mode 100644 index 3252cc1d..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -}; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/routes/router.js deleted file mode 100644 index 18b49770..00000000 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth/src/routes/router.js +++ /dev/null @@ -1,5 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); - -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template new file mode 160000 index 00000000..aa790d8d --- /dev/null +++ b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit aa790d8dfd5c7c057e8d5983855ca4bfd3762912 diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/.env b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/.env deleted file mode 100644 index 155f83bd..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/.env +++ /dev/null @@ -1,17 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. -SERVER_PORT= # Default: 8000 - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database. This should include the protocol, username, password, and host as applicable. -# Do not include the database name here if it is intended to be specified separately. -DATABASE_URL= - -# Specify the name of the database to which the application will connect. -# If not specified, the default database 'yonodeDB' will be used. -DATABASE_NAME= # Default: yonodeDB - -# Please replace the placeholders (, , and ) with your specific configuration values. diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/.gitignore b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/.gitignore deleted file mode 100644 index 3713ac14..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.vscode -/node_modules diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/README.md b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/README.md deleted file mode 100644 index a8acf283..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Yonode + MySQL with Sequelize - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -```bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server -``` -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! - diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/package.json b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/package.json deleted file mode 100644 index c9a4345a..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^6.10.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "jsonwebtoken": "^9.0.2", - "dotenv": "^16.3.1", - "bcrypt": "^5.1.1", - "joi": "^17.10.0", - "chalk": "5.3.0", - "morgan": "^1.10.0", - "helmet": "^7.0.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13", - "sequelize": "^6.36.0" - }, - "devDependencies": { - "nodemon": "^3.0.1" - } -} diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/app.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/app.js deleted file mode 100644 index 35356201..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/app.js +++ /dev/null @@ -1,20 +0,0 @@ -// import the packages -import express from 'express'; -import chalk from 'chalk'; - -// import your files -import { port } from './config/initial.config.js'; -import { connectDB } from './config/db.config.js'; -import './models/models.js'; - -// Initializing the app -const app = express(); - -// rest of your code here - - -connectDB() - -app.listen(port, () => { - console.log(`${chalk.green.bold('Server')} is listening on port ${port}`); -}); diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/config/db.config.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/config/db.config.js deleted file mode 100644 index c8e7dd98..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/config/db.config.js +++ /dev/null @@ -1,18 +0,0 @@ -import chalk from "chalk"; -import { Sequelize } from "sequelize" -import { dbUrl } from "./initial.config.js"; - -export const sequelize = new Sequelize(dbUrl); -export const connectDB = async () => { - try { - await sequelize.authenticate(); - console.log(`${chalk.green.bold('Connected')} to the database`); - await sequelize.sync(); - console.log(`${chalk.green.bold('Models synced')} successfully`); - } catch (error) { - console.log(`${chalk.red.bold('Error')} connecting to database`, error); - process.exit(1); - } -} - -export default sequelize; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/config/initial.config.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/config/initial.config.js deleted file mode 100644 index 80fa958c..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,6 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; -export const dbUrl = process.env.DATABASE_URL + process.env.DATABASE_NAME || 'yonodeDB'; diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/controllers/controller.js deleted file mode 100644 index d15c14cd..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -} \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/models/model.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/models/model.js deleted file mode 100644 index 82c722b5..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/models/model.js +++ /dev/null @@ -1,11 +0,0 @@ -import { sequelize } from '../config/db.config.js'; - -const modelName = sequelize.define('modelName', { - // rest of your schema here - -}); - -export default modelName; - - - diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/models/models.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/models/models.js deleted file mode 100644 index bfb939d7..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/models/models.js +++ /dev/null @@ -1,7 +0,0 @@ -import modelName from "./model.js"; - -const models = { - modelName -} - -export default models; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/routes/router.js deleted file mode 100644 index 18b49770..00000000 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/routes/router.js +++ /dev/null @@ -1,5 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); - -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/utils/utils.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth/src/utils/utils.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template new file mode 160000 index 00000000..6b729950 --- /dev/null +++ b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit 6b7299505bec806dd996c2d4023c11ea9067f9d6 diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/.env b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/.env deleted file mode 100644 index 155f83bd..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/.env +++ /dev/null @@ -1,17 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. -SERVER_PORT= # Default: 8000 - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database. This should include the protocol, username, password, and host as applicable. -# Do not include the database name here if it is intended to be specified separately. -DATABASE_URL= - -# Specify the name of the database to which the application will connect. -# If not specified, the default database 'yonodeDB' will be used. -DATABASE_NAME= # Default: yonodeDB - -# Please replace the placeholders (, , and ) with your specific configuration values. diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/.gitignore b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/.gitignore deleted file mode 100644 index e8d451db..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.vscode/ -node_modules/ - diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/README.md b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/README.md deleted file mode 100644 index 58712ad2..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Yonode + MySQL with TypeORM - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -```bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server -``` -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! - diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/package.json b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/package.json deleted file mode 100644 index f98616b7..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^6.10.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "jsonwebtoken": "^9.0.2", - "dotenv": "^16.3.1", - "bcrypt": "^5.1.1", - "joi": "^17.10.0", - "chalk": "5.3.0", - "morgan": "^1.10.0", - "helmet": "^7.0.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13", - "reflect-metadata": "^0.1.13", - "typeorm": "0.3.20" - }, - "devDependencies": { - "nodemon": "^3.0.1" - } -} diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/app.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/app.js deleted file mode 100644 index 0f0b648b..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/app.js +++ /dev/null @@ -1,17 +0,0 @@ -// import the packages -import express from "express"; -import chalk from "chalk"; - -// import your files -import { port } from "./config/initial.config.js"; -import "./config/db.config.js"; - -// Initializing the app -const app = express(); - -// 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-MySQL-TypeORM-NoAuth/src/config/db.config.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/config/db.config.js deleted file mode 100644 index 341bd466..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/config/db.config.js +++ /dev/null @@ -1,25 +0,0 @@ -import "reflect-metadata"; -import { DataSource } from "typeorm"; -import { dbName, dbUrl } from "./initial.config.js"; -import chalk from "chalk"; - -const AppDataSource = new DataSource({ - type: "mysql", - url: dbUrl, - database: dbName, - entities: ["../entity/*/.js"], -}); - -AppDataSource.initialize() - .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); - }) - .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) - ); - -export default AppDataSource; diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/config/initial.config.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/config/initial.config.js deleted file mode 100644 index e70683cf..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; -export const dbUrl = process.env.DATABASE_URL; -export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/controllers/controller.js deleted file mode 100644 index e641c1a7..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -}; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/entity/entity.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/entity/entity.js deleted file mode 100644 index 78e8d4dc..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/entity/entity.js +++ /dev/null @@ -1,14 +0,0 @@ -import { EntitySchema } from "typeorm"; - -const schemaName = new EntitySchema({ - name: "schemaName", - tableName: "tableName", - columns: { - id: { - primary: true, - type: "int", - generated: true, - }, - }, -}); -export default schemaName; diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/routes/router.js deleted file mode 100644 index 18b49770..00000000 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/routes/router.js +++ /dev/null @@ -1,5 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); - -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/utils/utils.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth/src/utils/utils.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template new file mode 160000 index 00000000..2f05e7c3 --- /dev/null +++ b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit 2f05e7c31dbc022d04488f3abdaa77847298e755 diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/.env b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/.env deleted file mode 100644 index aa1c4e85..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/.env +++ /dev/null @@ -1,14 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. - -SERVER_PORT= - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database, This should include the protocol, username, password, host, port, and database name as applicable. - -# Format: protocol://username:password@host:port/databaseName - -DATABASE_URL= diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/.gitignore b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/.gitignore deleted file mode 100644 index 7af7f047..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -.env \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/README.md b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/README.md deleted file mode 100644 index d5b818f7..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Yonode + PostgreSQL with Prisma - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server - -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/package.json b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/package.json deleted file mode 100644 index 22943138..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "@prisma/client": "^5.9.1", - "bcrypt": "^5.1.1", - "chalk": "^5.3.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "dotenv": "^16.4.1", - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^7.1.5", - "helmet": "^7.1.0", - "joi": "^17.12.1", - "jsonwebtoken": "^9.0.2", - "morgan": "^1.10.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13" - }, - "devDependencies": { - "nodemon": "^3.0.1", - "prisma": "^5.9.1" - } -} diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/prisma/schema.prisma b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/prisma/schema.prisma deleted file mode 100644 index 169fef55..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/prisma/schema.prisma +++ /dev/null @@ -1,15 +0,0 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -generator client { - provider = "prisma-client-js" -} - -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -model modelName { - id Int @id @default(autoincrement()) -} \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/app.js b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/app.js deleted file mode 100644 index e9b49330..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/app.js +++ /dev/null @@ -1,15 +0,0 @@ -// import the packages -import express from "express"; - -//import your files -import { port } from "./config/initial.config.js"; -import chalk from "chalk"; - -// Initializing the app -const app = express(); - -// 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-Prisma-NoAuth/src/config/initial.config.js b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/config/initial.config.js deleted file mode 100644 index 2086eceb..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,5 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/controllers/controller.js deleted file mode 100644 index 3252cc1d..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -}; \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/routes/router.js deleted file mode 100644 index 18b49770..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth/src/routes/router.js +++ /dev/null @@ -1,5 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); - -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template new file mode 160000 index 00000000..6cab8306 --- /dev/null +++ b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit 6cab830617847bdc64255c0fc8740e16aa52d82b diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/.env b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/.env deleted file mode 100644 index 155f83bd..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/.env +++ /dev/null @@ -1,17 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. -SERVER_PORT= # Default: 8000 - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database. This should include the protocol, username, password, and host as applicable. -# Do not include the database name here if it is intended to be specified separately. -DATABASE_URL= - -# Specify the name of the database to which the application will connect. -# If not specified, the default database 'yonodeDB' will be used. -DATABASE_NAME= # Default: yonodeDB - -# Please replace the placeholders (, , and ) with your specific configuration values. diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/.gitignore b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/.gitignore deleted file mode 100644 index 3713ac14..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.vscode -/node_modules diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/README.md b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/README.md deleted file mode 100644 index db314115..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Yonode + PostgreSQL with Sequelize - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -```bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server -``` -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! - diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/package.json b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/package.json deleted file mode 100644 index c9a4345a..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^6.10.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "jsonwebtoken": "^9.0.2", - "dotenv": "^16.3.1", - "bcrypt": "^5.1.1", - "joi": "^17.10.0", - "chalk": "5.3.0", - "morgan": "^1.10.0", - "helmet": "^7.0.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13", - "sequelize": "^6.36.0" - }, - "devDependencies": { - "nodemon": "^3.0.1" - } -} diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/app.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/app.js deleted file mode 100644 index 35356201..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/app.js +++ /dev/null @@ -1,20 +0,0 @@ -// import the packages -import express from 'express'; -import chalk from 'chalk'; - -// import your files -import { port } from './config/initial.config.js'; -import { connectDB } from './config/db.config.js'; -import './models/models.js'; - -// Initializing the app -const app = express(); - -// rest of your code here - - -connectDB() - -app.listen(port, () => { - console.log(`${chalk.green.bold('Server')} is listening on port ${port}`); -}); diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/config/db.config.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/config/db.config.js deleted file mode 100644 index 82dfe8ec..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/config/db.config.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Sequelize } from 'sequelize'; -import { dbUrl} from './initial.config.js' -import chalk from 'chalk'; - -const sequelize = new Sequelize(dbUrl); -export const connectDB = async () => { - try { - await sequelize.authenticate(); - console.log(`${chalk.green.bold('Connected')} to the database`); - await sequelize.sync({ force: true }); - console.log(`${chalk.green.bold('Models synced')} successfully`); - } catch (error) { - console.log(`${chalk.red.bold('Error')} connecting to database`, error); - process.exit(1); - } -} - -export default sequelize; diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/config/initial.config.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/config/initial.config.js deleted file mode 100644 index 80fa958c..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,6 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; -export const dbUrl = process.env.DATABASE_URL + process.env.DATABASE_NAME || 'yonodeDB'; diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/controllers/controller.js deleted file mode 100644 index 3252cc1d..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -}; \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/models/model.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/models/model.js deleted file mode 100644 index 721f30e6..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/models/model.js +++ /dev/null @@ -1,7 +0,0 @@ -import sequelize from "../config/db.config.js"; - -const modelName = sequelize.define('modelName', { - -}); - -export default modelName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/models/models.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/models/models.js deleted file mode 100644 index 5d19843e..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/models/models.js +++ /dev/null @@ -1,7 +0,0 @@ -import modelName from './model.js' - -const models = { - modelName -} - -export default models; \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/routes/router.js deleted file mode 100644 index 18b49770..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/routes/router.js +++ /dev/null @@ -1,5 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); - -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/utils/utils.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth/src/utils/utils.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template new file mode 160000 index 00000000..e99851ab --- /dev/null +++ b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template @@ -0,0 +1 @@ +Subproject commit e99851ab0f35220c561c6037c40f014f6595d8a1 diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/.env b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/.env deleted file mode 100644 index 155f83bd..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/.env +++ /dev/null @@ -1,17 +0,0 @@ -# Server Configuration -# -------------------- -# Specify the port number on which the server will listen for incoming connections. -# If not specified, the default port 8000 will be used. -SERVER_PORT= # Default: 8000 - -# Database Configuration -# ---------------------- -# Provide the URL for connecting to the database. This should include the protocol, username, password, and host as applicable. -# Do not include the database name here if it is intended to be specified separately. -DATABASE_URL= - -# Specify the name of the database to which the application will connect. -# If not specified, the default database 'yonodeDB' will be used. -DATABASE_NAME= # Default: yonodeDB - -# Please replace the placeholders (, , and ) with your specific configuration values. diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/.gitignore b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/.gitignore deleted file mode 100644 index 8d056c8e..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.vscode/ -node_modules/ diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/README.md b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/README.md deleted file mode 100644 index 9c2a243f..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Yonode + PostgreSQL with TypeORM - -This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. - -## Getting Started - -Initially, navigate to the .env file to set up the required environment variables. - -Next, launch the development server: - -```bash -npm run server -# or -yarn server -# or -pnpm server -# or -bun server -``` -The server is running and ready to serve requests. - -Now, Go to the Src directory and start building the server. - -Happy coding! - diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/package.json b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/package.json deleted file mode 100644 index f98616b7..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "yonode-api", - "version": "0.0.0", - "private": true, - "main": "./src/app.js", - "type": "module", - "scripts": { - "start": "node ./src/app.js", - "dev": "nodemon ./src/app.js" - }, - "dependencies": { - "express": "^4.18.2", - "express-async-handler": "^1.2.0", - "express-rate-limit": "^6.10.0", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "jsonwebtoken": "^9.0.2", - "dotenv": "^16.3.1", - "bcrypt": "^5.1.1", - "joi": "^17.10.0", - "chalk": "5.3.0", - "morgan": "^1.10.0", - "helmet": "^7.0.0", - "nodemailer": "^6.9.9", - "uuidv4": "^6.2.13", - "reflect-metadata": "^0.1.13", - "typeorm": "0.3.20" - }, - "devDependencies": { - "nodemon": "^3.0.1" - } -} diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/app.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/app.js deleted file mode 100644 index 91f795cb..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/app.js +++ /dev/null @@ -1,16 +0,0 @@ -// import the packages -import express from "express"; -import chalk from "chalk"; - -//import your files -import { port } from "./config/initial.config.js"; -import "./config/db.config.js"; - -//initializing the app -const app = express(); - -// 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/src/config/db.config.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/config/db.config.js deleted file mode 100644 index 7a3731a3..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/config/db.config.js +++ /dev/null @@ -1,25 +0,0 @@ -import "reflect-metadata"; -import { DataSource } from "typeorm"; -import { dbName, dbUrl } from "./initial.config.js"; -import chalk from "chalk"; - -const AppDataSource = new DataSource({ - type: "postgres", - url: dbUrl, - database: dbName, - entities: ["../entity/*/.js"], -}); - -AppDataSource.initialize() - .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); - }) - .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) - ); - -export default AppDataSource; diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/config/initial.config.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/config/initial.config.js deleted file mode 100644 index e70683cf..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/config/initial.config.js +++ /dev/null @@ -1,7 +0,0 @@ -import dotenv from 'dotenv'; - -dotenv.config(); - -export const port = process.env.SERVER_PORT || 8000; -export const dbUrl = process.env.DATABASE_URL; -export const dbName = process.env.DATABASE_NAME || 'yonodeDB'; diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/controllers/controller.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/controllers/controller.js deleted file mode 100644 index e641c1a7..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/controllers/controller.js +++ /dev/null @@ -1,7 +0,0 @@ -export const controller = async (req, res) => { - try { - - } catch (error) { - - } -}; \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/entity/entity.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/entity/entity.js deleted file mode 100644 index 78e8d4dc..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/entity/entity.js +++ /dev/null @@ -1,14 +0,0 @@ -import { EntitySchema } from "typeorm"; - -const schemaName = new EntitySchema({ - name: "schemaName", - tableName: "tableName", - columns: { - id: { - primary: true, - type: "int", - generated: true, - }, - }, -}); -export default schemaName; diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/middlewares/middleware.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/middlewares/middleware.js deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/routes/router.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/routes/router.js deleted file mode 100644 index 18b49770..00000000 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/routes/router.js +++ /dev/null @@ -1,5 +0,0 @@ -import express from "express"; - -const routerName = express.Router(); - -export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/utils/utils.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth/src/utils/utils.js deleted file mode 100644 index e69de29b..00000000