2022.12.29 - Init

This commit is contained in:
Killer Boss Original 2022-12-29 11:51:37 +00:00
parent f5e6a52777
commit 59ce5e1963
5 changed files with 66 additions and 33 deletions

3
.gitignore vendored
View file

@ -1 +1,2 @@
node_modules
node_modules
package-lock.json

View file

@ -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/<auth-code>/database to get all db
ip://api/<auth-code>/database/<name> search name in the database
ip://api/<auth-code>/database/<name>/set/<value> set a name's value in the database
ip://api/<auth-code>/database/<name>/remove remove <name> in the database

View file

@ -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
/*
{}
*/

View file

@ -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"
}
}

14
src/server.js Normal file
View file

@ -0,0 +1,14 @@
/*module.exports = function (interface) {
if (interface == 'gui') {
async function home() {
std.cin('MitDB >'.red)
.then((cmd) => {
})
}
}
}
*/
/*
{}
*/