A Hono-based mock server for simulating Wikidot's AJAX APIs: ajax-module-connector.php and ajax-action-connector.php. This server provides mock implementations of many common Wikidot modules and actions.
- Mock implementation of Wikidot's ajax-module-connector.php
- Mock implementation of Wikidot's ajax-action-connector.php
- Support for various Wikidot modules including:
- Page editing and viewing
- File management
- Forum functionality
- User accounts
- Search
- Page history and more
# Install dependencies
npm install
# or with pnpm
pnpm install
# Start development server
npm run devThis server only accepts POST requests to the following endpoints:
/ajax-module-connector.php- Handles module requests/ajax-action-connector.php- Handles action requests
Send a POST request with form-urlencoded data to /ajax-module-connector.php with the following parameters:
moduleName(required) - The name of the module to load (e.g.edit/PageEditModule)callbackIndex- The callback index for Wikidot's AJAX system- Other parameters as required by the specific module
Example:
curl -X POST http://localhost:8787/ajax-module-connector.php \
-d "moduleName=edit/PageEditModule&callbackIndex=0&pageId=1"edit/PageEditModule- Page editing interfaceedit/PagePreviewModule- Preview page contenthistory/PageHistoryModule- View page historyhistory/PageDiffModule- Compare page revisionshistory/PageSourceModule- View page source for a revisionhistory/PageRevisionListModule- List page revisionsfiles/PageFilesModule- List files attached to a pagefiles/FileUploadModule- File upload interfacepagetags/PageTagsModule- Page tags interfaceviewsource/ViewSourceModule- View page sourceforum/*- Various forum modulesaccount/*- User account modulessearch/SearchModule- Search functionalitylogin/*- Login and authentication moduleswatch/*- Page/thread watching modules
Send a POST request with form-urlencoded data to /ajax-action-connector.php with the following parameters:
action(required) - The action to performmoduleName- For module-based actionseventName- For event-based actions- Other parameters as required by the specific action
This project is built with:
- Hono - Web framework
- TypeScript - Type safety
- Wrangler - Development server and deployment
MIT