Issue with moralis-admin-cli deploy

Hi
I have started following step by step your: Ultimate NFT Tutorial,
Unfortunately at the point where I need to deploy my simple HTML page to moralis server, I got stuck.

Iā€™m using VS Code as IDE. and following the guide.

I never had a message that the deployment is successful.
and when I check the webpage: - https://1ufa53je9w4d.grandmoralis.com/
everytime i got - coming Soon page :o))))

Any ideas what Iā€™m doing wrong ???

Thank you in advance.

I just tried deployment as well to my app and it worked perfectly. Perhaps watching this tutorial on how to host dapps will help. -

Let me know if this helped or youā€™re still stuck.

Thanks. Happy BUIDLing! :man_mechanic:

Iā€™m having this specific issue with the deploy command.
Obviously Iā€™m not understanding how ā€œDestination folderā€ and ā€œfolderPathā€ relate.
Obviously they donā€™t. Can someone clue me into what ā€œDestination folderā€ actually means?
Hereā€™s my redacted .env, and my uncooperative command line history from the same directory.
Or are we missing some documentation of what folders are on the server side that you guys think is implicit but is obfuscated to me.
Thanks!

1 Like

It looks like the deploy command doesnā€™t look in process.env for folderPath in particular.

Ok, cool! So my residual question is how do I push other values in the .env file to the Moralis deployment? Iā€™ve a Transak API key for example that works great on localhost, but is being dropped when Moralis serves the site.

Can you explain again what is happening with that Transak API key?
It is not clear for me what it is happening.

  • We need a fiat bridge for our ā€œUSA Walletā€ project.
  • We are entirely on Polygon (for now) to dodge main net fees.
  • We tried using the Moralis OnRamper plug-in, but found OnRamper thinks only one of its suppliers will allow purchases from U$D directly to Matic or USDC on polygonā€¦but tests showed that their supplier does not actually support that route.
  • A brief search of the industry landed us on Transak as a service that can actually bridge U$D to Matic.
  • So yeah, weā€™re using Transak, and weā€™ve applied as a company for an API key from Transak.
  • There are fees involved so we canā€™t just leave the API key in a file on GitHub because our project is open source.
  • We keep all our API keys in the .env file within our project and all developers have .env in our .gitignore to keep it off the web.
  • (The production Moralis keys are in there too).
  • Our Transak object/widget loads our API key for it just fine while running locally.
  • But tests show the deployed version on Moralis static hosting immediately errors out complaining of a blank API key.
  • I read from that that the moralis cli deploy key is reading the Moralis API keys from the same .env file while its running locally and pushing the build to the Moralis server, which never needs its own API keys again. But the Transak API key gets left behind as the .env file never loads to the server?

So I need another means to push our Transak API key to the server so our code can access it while running on the static host. BUT I canā€™t leave said keys in a file anywhere in our project on GitHub.

I think that I understand now, the static hosting on Moralis server actually will keep only static files. moralis-admin-cli will read from that env file the moralisApiKey in order to be able to push that build, but it will not also push that api key on server.

Having that Transak API key in a static file would be fine for you? Not on GitHub, but if in your deployment script you extract it from the env file and put it in a file before making the deploy on Moralis server then it would be fine?

Another option that I am thinking is to make your own plugin similar to OnRamper plug-in but specific to Transak, but you may have to wait until we will add this support.

Another option is to use a different hosting provider where you could host a backend that it does not have only static files.