Releases: dev-whoan/mapi
Releases · dev-whoan/mapi
v0.0.6
Version: 0.0.6
Date: 3rd, Feburary, 2023
New Features
####Service
- Service is one of the powerful feature which letting you be able to DI
- You can customize response for RESTful API Request using [ /configs/services/db | /configs/services/function ]
- For now, [ /configs/services/db ] is available
- You can check example on attatched configs.zip or configs.tar
Updated Logs:
- All the name related
mysql
changed intomariadb
. - CORS issue fix.
Installation
Docker
~$ docker run -d -p 3000:3000 -v [path-to-mapi-configs]:/app/configs --name mapi devwhoan/mapi:0.0.6
Nodejs
- Download Nodejs Source Code
~$ git clone https://github.com/dev-whoan/mapi.git
- Download Configs
.zip
or.tar.gz
~$ wget -o ..
- Unzip the configs
~$ tar -xzvf configs.tar.gz
- Move the configs directory into mapi
~$ cp -r configs ./mapi
- Configure the
.json
under the configs directory - Install the dependencies
~$ cd mapi && npm install
mapi$ npm start
Test with local databases - MariaDB or MongoDB
Install and Setting Environment of MariaDB Using Docker
docker run -d -p 9306:3306 -v /Users/eugene/Store/local_mariadb:/var/lib/mysql \
-e MARIADB_ROOT_PASSWORD=root \
--name mariadb mariadb
docker exec -it mariadb /bin/bash
mysql -u root -p
MariaDB[none]> CREATE DATABASE MAPI;
MariaDB[none]> GRANT ALL PRIVILEGES ON MAPI.* TO 'mapi'@'%' IDENTIFIED BY 'mapiadmin';
MariaDB[none]> USE MAPI;
MariaDB[MAPI] > CREATE TABLE `JWT_AUTH` (
...> `SEQ` int(11) NOT NULL AUTO_INCREMENT,
...> `name` varchar(45) NOT NULL,
...> `password` varchar(45) NOT NULL,
...> `email` varchar(45) DEFAULT NULL,
...> PRIMARY KEY (`SEQ`)
...> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
Ok!
MariaDB[MAPI] > CREATE TABLE `client` (
...> `SEQ` INT NOT NULL AUTO_INCREMENT,
...> `NAME` VARCHAR(45) NOT NULL,
...> `AGE` INT NULL,
...> `DESCRIPTION` VARCHAR(512) NULL DEFAULT 'Hello, MAPI!',
...> PRIMARY KEY (`SEQ`)
...> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
Ok!
MariaDB[MAPI] > INSERT INTO `JWT_AUTH` ( `name`, `password`, `email` ) VALUES (
...> 'mapi_test',
...> 'mapi',
...> '[email protected]'
);
Ok!
MariaDB[MAPI] >INSERT INTO `client`( `NAME`,
`AGE`,
`DESCRIPTION`
) VALUES (
'mapi-jwt',
1,
'Hello, Welcome To MAPI Demo! I have born by dev.whoan, and I am so~ glad to meet you!. Please enjoy me. If you have any question, you can contac [email protected] or follow the MAPI introduce page!'
);
Ok!
Install and Setting Environment of MongoDB Using Docker
docker run -d -p 9717:27017 -v /Users/eugene/Store/local_mongodb:/data/db \
-e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=root \
--name mongodb mongo
docker exec -it mongodb /bin/bash
~$ mongosh -u root -p root
test> use MAPI;
MAPI> db.createUser({
user: "mapi",
pwd: "mapi_password",
roles: [ "readWrite", "userAdmin" ],
mechanisms: [ "SCRAM-SHA-256" ],
passwordDigestor: "server"
});
{ ok: "1" }
MAPI> db.createCollection("client", {
validator: {
$jsonSchema: {
bsonType: 'object',
required: [ 'NAME', 'AGE' ],
properties: {
NAME: {
bsonType: 'string'
},
AGE: {
bsonType: 'long'
}
}
}
}
});
{ ok: "1" };
MAPI> db.createCollection("JWT_AUTH", {
validator: {
$jsonSchema: {
bsonType: 'object',
required: [ 'name', 'password' ],
properties: {
name: {
bsonType: 'string',
description: 'Name of user'
},
email: {
bsonType: 'string',
description: 'Email of user'
},
password: {
bsonType: 'string',
description: 'Password of user'
}
}
}
}
});
{ ok: "1" };
v0.0.5b
Version: 0.0.5b
Date: 28th January, 2023
New Features
- None (Bug Fix)
Updated Logs:
- All the name related
mysql
changed intomariadb
. - CORS issue fix.
Installation
Docker
~$ docker run -d -p 3000:3000 -v [path-to-mapi-configs]:/app/configs --name mapi devwhoan/mapi:0.0.5
Nodejs
- Download Nodejs Source Code
~$ git clone https://github.com/dev-whoan/mapi.git
- Download Configs
.zip
or.tar.gz
~$ wget -o ..
- Unzip the configs
~$ tar -xzvf configs.tar.gz
- Move the configs directory into mapi
~$ cp -r configs ./mapi
- Configure the
.json
under the configs directory - Install the dependencies
~$ cd mapi && npm install
mapi$ npm start
v0.0.5
Version: 0.0.5
Date: 19th December, 2022
New Features
- Supporting Pagination in REST API
Updated Logs:
- Supporting Pagination in REST API
- Prepare-session: Supporting Google Filestore, File-Transfer
Installation
Docker
~$ docker run -d -p 3000:3000 -v [path-to-mapi-configs]:/app/configs --name mapi devwhoan/mapi:0.0.5
Nodejs
- Download Nodejs Source Code
~$ git clone https://github.com/dev-whoan/mapi.git
- Download Configs
.zip
or.tar.gz
~$ wget -o ..
- Unzip the configs
~$ tar -xzvf configs.tar.gz
- Move the configs directory into mapi
~$ cp -r configs ./mapi
- Configure the
.json
under the configs directory - Install the dependencies
~$ cd mapi && npm install
mapi$ npm start
Full Changelog: https://github.com/dev-whoan/mapi/commits/research
v0.0.4
Version: 0.0.4
Date: 5th December, 2022
New Features
- Supporting MongoDB for REST API
Updated Logs:
- Supporting MongoDB for REST API
- For Authorization(JWT), declare it on controller's property, not in proxy-list. (proxy-list: [..., "auth",...] is deprecated.
Installation
Docker
~$ docker run -d -p 3000:3000 -v [path-to-mapi-configs]:/app/configs --name mapi devwhoan/mapi:0.0.4
Nodejs
- Download Nodejs Source Code
~$ git clone https://github.com/dev-whoan/mapi.git
- Download Configs
.zip
or.tar.gz
~$ wget -o ..
- Unzip the configs
~$ tar -xzvf configs.tar.gz
- Move the configs directory into mapi
~$ cp -r configs ./mapi
- Configure the
.json
under the configs directory - Install the dependencies
~$ cd mapi && npm install
mapi$ npm start
Full Changelog: https://github.com/dev-whoan/mapi/commits/research