Manage your documents of project with this tool
Project configuration available in config.js
file
debugEnabled
provide us to log if it enabled true.enableEditDoc
provide us to a way to edit doc from client side.enableDocSave
provide us to save edited content directly from client side.searchCacheExpiry
(in seconds) expiry duration for search cached index.editDoc.autoLocalSave
store edited content in cache if any situation we lost access from browser it will restore in next session.editDoc.autoSaveDuration
(in seconds) local save duration ifautoLocalSave
enabled.editDoc.autoSaveExpiry
(in seconds) expiry duration of local saveapiServiceBaseUri
: Base of all APIapiLogin
: Login API PathapiSaveDoc
: Save Document API path
We can host this project in any server like IIS, node, python, Apache, Java...
This project required Single entry page to handle all page so we configure project to
use index.html
page in every request. We return file if request path have a file,
we return not found if request path is directory but there is not content and otherwise we return index.html
We have 2 sample script to host over project
- node.js
- lite-server
- MVC (IIS)
Copy project data (source code) in a folder project_folder
and download server/node/server.js
and copy it to project_folder
.
Download NodeJS and install it to system
$ cd project_folder
$ npm install express
$ npm install body-parser
$ npm install jsonwebtoken
In server.js
we configure setting in first code block config
.
var config = {
saveDocEnabled: true,
gitLocalSave: true,
gitRemoteSave: false
};
saveDocEnabled
property enable to give permission to project to save file from client side.gitLocalSave
property enable to commit data on save changes (beta)gitRemoteSave
property enable to push commit on remote server (Will be in next release)
$ node server.js
$ npm install lite-server
$ lite-server
Open visual studio and create new project MVC template
change RouteConfig.cs
in App_Start
to this code
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
// only 1 entry point
routes.MapRoute(
"Default",
"{*path}",
new { controller = "Home", action = "Index" }
);
}
}
change Action Index
code
public ActionResult Index()
{
return File(HttpContext.Server.MapPath("~/index.html"), "text/html");
}
publish MVC project and host it on IIS. and copy document project data in hosted root folder.