mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
setted up restapi in json
This commit is contained in:
parent
37e34e868f
commit
4da6cf8784
2 changed files with 8 additions and 5 deletions
|
|
@ -6,9 +6,10 @@
|
|||
var DIR = process.cwd() + '/',
|
||||
main = require(DIR + 'lib/server/main'),
|
||||
Util = main.util,
|
||||
|
||||
APIURL = '/api/v1';
|
||||
|
||||
|
||||
APIURL = '/api/v1',
|
||||
OK = 200;
|
||||
|
||||
/**
|
||||
* rest interface
|
||||
* @pConnectionData {request, responce}
|
||||
|
|
@ -23,7 +24,9 @@
|
|||
console.log(lUrl);
|
||||
console.log(lMethod);
|
||||
|
||||
if( Util.isContainStr(lUrl, APIURL) ){
|
||||
if( Util.isContainStr(lUrl, APIURL) ){
|
||||
var lHead = main.generateHeaders('api.json', false);
|
||||
lRes.writeHead(OK, lHead);
|
||||
lRes.end(APIURL);
|
||||
lRet = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cloudcmd",
|
||||
"version": "0.1.7-20",
|
||||
"version": "0.1.7",
|
||||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
||||
"description": "Two-panels file manager, totally writed on js.",
|
||||
"homepage": "https://github.com/coderaiser/cloudcmd",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue