Module: AdminRouter

Description

Admin - router.js contains all the requests done in the admin module.

Route: "/" - Go to the Home Page.

Method

Path

GET

/

Route: "/errorpage" - Redirected when error is generated

Method

Path

GET

/errorpage

Route: "/view" - View the entire page list.

Method

Path

GET

/view

Route: "/delete" - Delete the selected page

Method

Path

GET

/delete?page=

Parameters:

Name

Type

Description

page

String

Name of the page to be deleted

Route: "/pagehtmlview" - View a selected page

Method

Path

GET

/pagehtmlview?page=

Parameters:

Name

Type

Description

page

String

Name of the page to be viewed

Route: "/pagenames" - List of all the generated pages

Method

Path

GET

/pagenames

Route: "/pageedit" - Open a page in Editor to make few modifications

Method

Path

GET

/pageedit

Route: "/savepage" - Save the edited page

Method

Path

GET

/savepage

Function: scan

Return a list of files of the specified fileTypes in the provided dir, with the file path relative to the given dir

scan()
Arguments
  • directoryName – path of the directory you want to search the files for

  • fileTypes – array of file types you are search files, ex: [‘.txt’, ‘.jpeg’]

Return results

This is the page list