node-db-importer
This module produces JSON files from a database. You can then use these files for other applications like JHipster.
Note: This module is a prototype, it doesn't do much at the moment. However it is easy to contribute to the project, just keep reading this document.
When completed, this module will :
- Connect to a SQL database
- Get a description of the database (using
SHOW COLUMNS
,DESCRIBE
,EXPLAIN
, etc.) - Get a SQL dump of the table entries (if you need it)
- Convert both to JSON, according to your preferences
Install and start
Use it into your project: Add this line to your package.json
dependencies :
"node-db-importer":"^0.0.1"
Then run $ npm install
.
For a global installation :
$ npm install -g node-db-importer
Then start the tool with :
$ node index
Requisites
Node latest stable release (v6.8 at least). Upgrade Node if necessary.
Contributing
Check our doc for more info.
Workflow: Your contributions are welcome. Create a Github issue to discuss enhancements, new features, etc. Please make pull requests to the dev
branch.
Testing: All tests must pass. We use Mocha and Istanbul for unit testing, and Travis for integration testing.
$ npm test
Linting: Linting enforces code conventions. We use eslint with the AirBnB ruleset + custom rules. Before making a pull request, please lint your branch with :
# lint a file $ eslint myfile # lint all files (when you're in the module's root) $ eslint .
If you need it, you can tell eslint to ignore some rules.
Help
MySQL : if you have trouble connecting to a local MySQL database, try leaving the 'Host address' field blank.
Contact
Create a github issue to discuss the module.
For private messages : bmichaux@altissia.org