The HTTP Gateway Protocol is an extension of the Internet Computer Protocol that allows conventional HTTP clients to interact with the Internet Computer network. This is important for software such as web browsers to be able to fetch and render client-side canister code, including HTML, CSS, and JavaScript as well as other static assets such as images or videos. The HTTP Gateway does this by translating between standard HTTP requests and API canister calls that the Internet Computer Protocol will understand.
You can read more about this protocol in the spec.
Command | Description |
---|---|
pnpm -F @dfinity/http-canister-client build |
Build NPM package |
pnpm -F http-canister-nodejs-example start |
Run the NodeJS example project |
Check out our contribution guidelines.
Install the correct version of NodeJS:
nvm install
Activate the correct version of NodeJS:
nvm use
Install and activate the correct version of PNPM:
corepack enable
cz commit
See Conventional commits for more information on the commit message formats
NPM packages are named @dfinity/<package-name>
and the folder name is <package-name>-js
.
An NPM package can be referenced using the package name and PNPM workspace protocol in package.json
:
{
"dependencies": {
"@dfinity/certificate-verification": "workspace:*"
}
}