Commit 13672183 authored by Kapilraj Thangeswaran's avatar Kapilraj Thangeswaran

Mise à jour readme

parent 80855542
...@@ -21,25 +21,25 @@ In order to work properly this module needs : ...@@ -21,25 +21,25 @@ In order to work properly this module needs :
- `apt install nodejs` - `apt install nodejs`
- `apt install node` - `apt install node`
- `apt install npm` - `apt install npm`
- `npm link mongodb` - `npm link mongodb`
- to download and install MongoDB - to download and install MongoDB
- For Windows : - For Windows :
- from the [MongoDB download page](https://www.mongodb.com/download-center#community) - from the [MongoDB download page](https://www.mongodb.com/download-center#community)
- For linux : - For linux :
- `# apt install mongodb` - `# apt install mongodb`
- `# echo 'jsonp=true' >> /etc/mongodb.conf` - `# echo 'jsonp=true' >> /etc/mongodb.conf`
- `# echo 'rest=true' >> /etc/mongodb.conf` - `# echo 'rest=true' >> /etc/mongodb.conf`
- on a virtual machine or a small system ONLY : `# echo 'smallfiles=true' >> /etc/mongodb.conf` - on a virtual machine or a small system ONLY : `# echo 'smallfiles=true' >> /etc/mongodb.conf`
- `# service mongodb restart` - `# service mongodb restart`
## Instructions ## Instructions
1. Install dependencies 1. Install dependencies
2. Add all your hdoc documents in an "input" folder 2. Add all your hdoc documents in an "input" folder
3. Add or edit "config.xml" file in "input" folder (for more details, please check "Input configuration") 3. Add or edit "config.xml" file in "input" folder (for more details, please check "Input configuration")
4. Edit "config.json" file from "mongo" folder (for more details, please check "Mongo configuration") 4. Edit "config.json" file from "mongo" folder (for more details, please check "MongoDB configuration")
5. Make sure that MongoDB is running (`mongod.exe --rest --jsonp` command from "MongoDB/Server/3.2/bin" folder) 5. Make sure that MongoDB is running (`mongod.exe --rest --jsonp` command from "MongoDB/Server/3.2/bin" folder)
6. Execute run.bat or chmod +x run.sh & ./run.sh 6. Execute run.bat or run.sh
## Web ## Web
This module provides a Web application to access MongoDB and execute simples requests. This module provides a Web application to access MongoDB and execute simples requests.
...@@ -58,6 +58,25 @@ on a virtual machine or a small system ONLY : `# echo 'smallfiles=true' >> /etc/ ...@@ -58,6 +58,25 @@ on a virtual machine or a small system ONLY : `# echo 'smallfiles=true' >> /etc/
You can add or edit "config.xml" in "input" folder in order to provide more information about your documents. You can add or edit "config.xml" in "input" folder in order to provide more information about your documents.
Supported information Supported information
- link - link
### Schema
```
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<element name="config">
<element name="file">
<attribute name="name"/>
<element name="link">
<data type="anyURI"/>
</element>
</element>
</element>
</start>
</grammar>
```
### Example
``` ```
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<config> <config>
...@@ -74,6 +93,8 @@ Use "config.json" in the "mongo" folder to specify ...@@ -74,6 +93,8 @@ Use "config.json" in the "mongo" folder to specify
- database : the database you are using - database : the database you are using
- collection : the collection you are using - collection : the collection you are using
- request : the request you want to perform (for allowed requests, please check "Supported requests") - request : the request you want to perform (for allowed requests, please check "Supported requests")
#### Example
``` ```
{ {
"url" : "mongodb://localhost:27017/", "url" : "mongodb://localhost:27017/",
...@@ -87,6 +108,8 @@ Use "config.json" in the "mongo" folder to specify ...@@ -87,6 +108,8 @@ Use "config.json" in the "mongo" folder to specify
Use "config.json" in the "web" folder to specify Use "config.json" in the "web" folder to specify
- url : mongodb's url including the database - url : mongodb's url including the database
- collection : the collection you are using - collection : the collection you are using
#### Example
``` ```
{ {
"url" : "mongodb://localhost:27017/database", "url" : "mongodb://localhost:27017/database",
......
...@@ -23,31 +23,50 @@ In order to work properly this module needs : ...@@ -23,31 +23,50 @@ In order to work properly this module needs :
- `apt install nodejs` - `apt install nodejs`
- `apt install node` - `apt install node`
- `apt install npm` - `apt install npm`
- `npm link mongodb` - `npm link mongodb`
- to download and install MongoDB - to download and install MongoDB
- For Windows : - For Windows :
- from the [MongoDB download page](https://www.mongodb.com/download-center#community) - from the [MongoDB download page](https://www.mongodb.com/download-center#community)
- For linux : - For linux :
- `# apt install mongodb` - `# apt install mongodb`
- `# echo 'jsonp=true' >> /etc/mongodb.conf` - `# echo 'jsonp=true' >> /etc/mongodb.conf`
- `# echo 'rest=true' >> /etc/mongodb.conf` - `# echo 'rest=true' >> /etc/mongodb.conf`
- on a virtual machine or a small system ONLY : `# echo 'smallfiles=true' >> /etc/mongodb.conf` - on a virtual machine or a small system ONLY : `# echo 'smallfiles=true' >> /etc/mongodb.conf`
- `# service mongodb restart` - `# service mongodb restart`
## Instructions ## Instructions
1. Install dependencies 1. Install dependencies
2. Add all your hdoc documents in an "input" folder 2. Add all your hdoc documents in an "input" folder
3. Add or edit "config.xml" file in "input" folder (for more details, please check "Input configuration") 3. Add or edit "config.xml" file in "input" folder (for more details, please check "Input configuration")
4. Edit "config.json" file from "mongo" folder in "hdoc_to_mongo" module (for more details, please check "Mongo configuration") 4. Edit "config.json" file from "mongo" folder in "hdoc_to_mongo" module (for more details, please check "MongoDB configuration")
5. Make sure that MongoDB is running (`mongod.exe --rest --jsonp` command from "MongoDB/Server/3.2/bin" folder) 5. Make sure that MongoDB is running (`mongod.exe --rest --jsonp` command from "MongoDB/Server/3.2/bin" folder)
6. Execute run.bat or chmod +x run.sh & ./run.sh 6. Execute run.bat or run.sh
## Input configuration ## Input configuration
You can add or edit "config.xml" in "input" folder to provide more information about your documents. You can add or edit "config.xml" in "input" folder to provide more information about your documents.
Supported information Supported information
- link - link
### Schema
```
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<element name="config">
<element name="file">
<attribute name="name"/>
<element name="link">
<data type="anyURI"/>
</element>
</element>
</element>
</start>
</grammar>
```
### Example
``` ```
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<config> <config>
...@@ -64,6 +83,8 @@ Use "config.json" in the "mongo" folder to specify ...@@ -64,6 +83,8 @@ Use "config.json" in the "mongo" folder to specify
- database : the database you are using - database : the database you are using
- collection : the collection you are using - collection : the collection you are using
- request : the request you want to perform (for allowed requests, please check "Supported requests") - request : the request you want to perform (for allowed requests, please check "Supported requests")
#### Example
``` ```
{ {
"url" : "mongodb://localhost:27017/", "url" : "mongodb://localhost:27017/",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment