# DataModule **Repository Path**: Thunderants/datamodule ## Basic Information - **Project Name**: DataModule - **Description**: 对应用中来的数据进行存储,做区块链记录和IPFS文件的映射 - **Primary Language**: NodeJS - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2017-07-08 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #DataModule——数据模块 ----------------------------------- ##安装 安装typescript:npm install typescript -g 安装tsd:npm install tsd -g 运行npm install进行依赖安装 ##命令 运行npm run build 进行编译 运行npm run dev 打开开发模式的服务端 运行npm run clear 进行构建目录清理 ##测试 运行npm run build 进行编译 运行npm run dev 打开开发模式的服务端 ##RPC接口 - ###存储数据 地址:/storeData 方法:post 参数: keystore object pwDerivedKey Uint8Array data string callback function 回调函数 返回(示例): {"error":false,"data":{},"reason":[]} - ###获取数据 地址:/getData 方法:get 参数: keystore object pwDerivedKey Uint8Array hash string ipfs hash callback function 回调函数 返回(示例): {"error":false,"data":{},"reason":[]}