This guide provides instructions for deploying modern typescript-based Angular web applications and websites to the InterPlanetary File System (IFPS) and the Internet Computer (IC) Mainnet. Information is also included for deploying AngularJS sites.
Select the location you want your code deployed to (IPFS for the InterPlanetary File System, or the Internet Computer Mainnet), and click the continue button.
Select the proper repository branch, and fill in the appropriate ‘build settings’ as shown below, then click the Deploy site button when ready!
Repository branch = master
Framework = Other
Docker image = node:latest
Build Command = npm install & npm run build
Publish directory = www
Build settings for Angular 13 web app deployed to IPFS
Things to Watch Out For
Deployment can take a few minutes to complete, and your site may take a few minutes after deployment before showing up.
Fleek will give you a default URL that is compatible with most browsers (e.g. my fleek default URL is https://preston.on.fleek.co/).
You can customize this default URL after deployment by clicking into your site from the hosting section, going to the settings, and clicking the ‘Change Site Name’ button.
URLs with .fleek.co are compatible with most browsers, but ENS domains have historically not been compatible with the most popular browsers like Safari and Google Chrome, although crypto-native browsers like Brave are compatible with ENS domains.
Fleek also offers automatic support for .eth.link and .eth.limo domains, both of which are compatible with popular browsers like Safari and Chrome, as discussed more fully below.
Your build settings may differ depending on your Angular version, code, or future changes to Fleek or the relevant networks.
ENS based domains may perform slower due to their decentralized nature, and certain domains may fluctuate in performance. My preferred domain is usually .eth.limo (compatibility, decentralized, & decent performance).
Step 4. Using ENS Domains
Click into your site from the hosting section, then go to settings, and then click domain management.
Look for the ENS section towards the main part of the screen, and click the ‘Add ENS’ button.
Enter an ENS domain that you own with the digital wallet you are using with your Fleek account. Click the ‘Verify’ button.
Fleek will show the address owner of the ENS domain you entered for you to verify your ownership. If everything looks correct like shown below but with your information, click the ‘Yes, Add ENS’ button.
The address shown should be your wallet, and the ENS domain should be one you own with that wallet and intend to use for your site.
You will then need to click ‘Set content hash’ on the Settings screen, and proceed through to click the ‘Set content hash’ button.
Make sure your wallet is on the proper network (ETH for this IPFS example).
You will be asked to sign a transaction and pay a small network fee ($2-$5 at the time of this article).
As mentioned in the previous section, ENS domains are not compatible with common browsers like Safari and Google Chrome, but Fleek automatically provides .eth.link and .eth.limo domains that accompany any deployed ENS domain, providing you with compatibility for common browsers like Safari and Chrome. Since this is done automatically, just visit yoursite.eth.limo after deploying to ENS to try it out!
Additional Resources
You may delete your hosted site by visiting the site’s settings and clicking the red Delete button towards the bottom. It may take some time before your site is entirely removed from the applicable networks and/or domains.