EdgeJS Configuration Steps
Overview
The EdgeJS service supports to execute the JavaScript codes you write by yourself at the edge server, providing you with programmable customized edge configuration capabilities and helping you customize your business rapidly.
Service Configuration Process
Service subscription
Currently, the EdgeJS service is in a phase of free trial, you can activate on CDN console.
- Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.
- Click EdgeJS Edge Service in the left navigation bar.
- Click Enable EdgeJS Service.
Create tasks
- Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.
- Click EdgeJS Edge Service in the left navigation bar.
- Enter the “EdgeJS Edge Service " page, click Create an EdgeJS task, and enter the page to create a task.
Select domain name
- After entering the page of creating new tasks, enter Task Name.
- Since the EdgeJS rules take effect depending on domain name, please configure the domain name of EdgeJS rule as required.
Fill the code of the rule
Fill in the rule code in the code box, as shown below.
The codes in the Figure are detailed as follows:
For detailed coding requirements, please see Configuration Methods for EdgeJS Rule.
Clicking clean will remove the codes in the code box, and you are recommended to save the edited contents before operation.
Debug and commissioning
After writing the code, click debug to trigger debugging, and the result shows in the “Debug Result” box on the right; if there is no problem, the box shows “Pass the Debugging”.
Pre-release
After debugging, click the pre-release button below to trigger the pre-release process. A prompt message will be generated on the current page after successful publication. Please select whole network release/cancel release after pre-release as soon as possible, or the other configurations may cover the current pre-release settings.
Release on the network
Click whole network release to trigger whole network release procedures. Pre-release is recommended, and then release in the whole network after confirmation.
Cancel to release
After the pre-release or release on the whole network, if the rule no longer applies to your needs, you can cancel/delete your release.
Operation log
- Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.
- Click EdgeJS Task Management on the Navbar to the left.
- Enter the page of "EdgeJS Task Management", and click Operation Log.
- The “Operation log record page " pops up on the left of the page, select the Time Period you want to view, and the page displays the corresponding EdgeJS task operation records.