dappblock / nextjs-ic-starter Goto Github PK
View Code? Open in Web Editor NEWNext.js Internet Computer Starter Template
License: MIT License
Next.js Internet Computer Starter Template
License: MIT License
Do you have any example with tailwindcss integrated in this ? Somehow, it is not picking tailwindcss classes ?
trying to run this locally and getting a net::ERR_CONNECTION_REFUSED
I can see that NEXT_PUBLIC_IC_HOST=http://localhost:8000 is already set
I suspect this is something like a CORS issue, but a confirmation and resolution would be great
From this note ```One thing to note is we use Next.js static code export here for hosting in Internet Computer so we can't use any features of Next.js that require server-side NodeJS. Potentially, there might be ways to use Internet Computer canister as a backend while deploying Next.js dapp to a hosting like Vercel that supports NodeJS servers in the future. Further research is needed on that aspect. However, if you do want to run everything decentralized on blockchain including the frontend, you would want to deploy the exported static code to Internet Computer as well.````
means that we are unable to use getServerSideProps and unable to use API/ route for serverside APIs. If yes, is there any alternative way to call API routes while hosting from frontend canister? Thanks!
Unhandled Runtime Error
TypeError: Failed to fetch
Source
ui/components/GreetingSection.js (21:21) @ async sayGreeting
19 |
20 | const helloActor = makeHelloActor()
21 | const greeting = await helloActor.greet(name)
| ^
22 |
23 | setLoading("")
24 | setGreetingMessage(greeting)
Hi,
I am a green hand in ICP. I want to add a new motoko canister to backend. I meet an error : "Must specify a host to connect to"
For test, I add a Hello2.mo like this
put it into the dfx.json
then, I run "deploy hello2", it succeeds, and I copy interface declarations from .dfx/local/canisters/hello2 to /ui/declarations/hello2
next, I create a new actor in actor-locator.js, like this
finally, I use it in ui/components/GreetingSection.js like this
I run dfx deploy and meet the error above.
What should I do to add a new backend? What steps did I miss? Need your help. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.