From 59ce5e1963c6c07bdc5a856daee32123c0c7b846 Mon Sep 17 00:00:00 2001 From: Killer Boss Original <73131550+killerbossoriginal@users.noreply.github.com> Date: Thu, 29 Dec 2022 11:51:37 +0000 Subject: [PATCH] 2022.12.29 - Init --- .gitignore | 3 ++- README.md | 22 +++++----------------- index.js | 32 ++++++++++++++++++++++++++++++++ package.json | 28 +++++++++++++--------------- src/server.js | 14 ++++++++++++++ 5 files changed, 66 insertions(+), 33 deletions(-) create mode 100644 src/server.js diff --git a/.gitignore b/.gitignore index b512c09..25c8fdb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +package-lock.json \ No newline at end of file diff --git a/README.md b/README.md index f12c747..6bcf195 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,7 @@ +# Warning + +This version didn't work, this is a work in project, you can use quickmap.db util we finish. + # Database + A quick-deploy database server - -installation: -- download the code from [here](https://github.com/FIUSdevelopment/database-server/archive/refs/tags/1.0.0.zip) -- change the password in password.js (it need to be an array) -- for start do npm start - -Save data in in ./data/database.json - -This is the link: - -ip://api//database to get all db - -ip://api//database/ search name in the database - -ip://api//database//set/ set a name's value in the database - -ip://api//database//remove remove in the database diff --git a/index.js b/index.js index e69de29..52deb71 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,32 @@ +var colors = require('colors'); +var readlineSync = require('readline-sync'); +var server = require('./src/server.js'); +server('gui') + +class mitdb { + /** + * @constructor + * @param type This can be 'client' or 'server' + * @param link If type = client, this is the server address (with the port), if type = server, this is the port + * @example (client) http://0.0.0.0:12934 + * @example (server) 12934 + */ + + constructor (type, link) { + this.type = type; + this.link = link; + if (type == 'client') { + + } else if (type == 'server') { + server('api') + } else { + throw new Error('Type is required') + } + } + server +} + +module.export = mitdb +/* +{} +*/ \ No newline at end of file diff --git a/package.json b/package.json index 623055e..163ad1f 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,27 @@ { - "name": "@fiusdevelopment/mit.db", - "version": "0.0.1", - "description": "A QuickDeploy Database Host", + "name": "mit.db", + "version": "2022.12.29", + "description": "An online server for quickmap.db", "main": "index.js", "scripts": { - "test": "npm start" + "test": "node index.js" }, "repository": { "type": "git", - "url": "git+https://github.com/FIUSDevelopment/mit-db.git" + "url": "git+https://github.com/ThunderNetworkRaD/mit.db.git" }, "keywords": [ - "database", - "javascript", - "nodejs", - "node.js", - "quickmap.db" + "Database" ], - "author": "FIUS Development | Killer Boss Original", - "license": "SEE LICENSE IN LICENSE.txt", + "author": "Thunder Network RaD | Killer Boss Original", + "license": "ISC", "bugs": { - "url": "https://github.com/FIUSDevelopment/mit-db/issues" + "url": "https://github.com/ThunderNetworkRaD/mit.db/issues" }, - "homepage": "https://github.com/FIUSDevelopment/mit-db#readme", + "homepage": "https://github.com/ThunderNetworkRaD/mit.db#readme", "dependencies": { - "@fiusdevelopment/map.db": "^1.0.2" + "colors": "^1.4.0", + "quickmap.db": "^2022.12.29", + "readline-sync": "^1.4.10" } } diff --git a/src/server.js b/src/server.js new file mode 100644 index 0000000..4317fe6 --- /dev/null +++ b/src/server.js @@ -0,0 +1,14 @@ +/*module.exports = function (interface) { + if (interface == 'gui') { + async function home() { + std.cin('MitDB >'.red) + .then((cmd) => { + + }) + } + } +} +*/ +/* +{} +*/ \ No newline at end of file