- Node.js
mapiCLI Installation
Select one of the development methods below.
npm installTranspile configuration is kept under the tsconfig.json file.
npx tscThe server code is located under src/plugin.ts
Now we can run the plugin with the mapi CLI!
For Typescript/Javascript, the server needs to be running first. You can do this with node.
Once the server is running, you can pass the URL to mapi run:
# Start the server
node dist/plugin.js &
# Start a new fuzzing job named 'plugin-example' and run for 60 seconds
mapi run --url <API_URL> plugin-example \
60 \
<API_SPECIFICATION_PATH> \
--rewrite-plugin http://localhost:50051There are two convenience scripts in this folder that automate starting and stopping the server.
# Start the server
./run-plugin.sh
# Start your mapi job
mapi run --url <API_URL> plugin-example \
60 \
<API_SPECIFICATION_PATH> \
--rewrite-plugin http://localhost:50051
# Stop the server
./stop-plugin.shℹ️ A port may be manually specified with the MAPI_PLUGIN_PORT environment variable.
Run with a manually specified port (9001):
MAPI_PLUGIN_PORT=9001 node dist/plugin.js &
Server running on port 9001