Xnode NextJS Base Template
Last updated
Last updated
In order to show how easy it is to leverage Xnode Studio, XnodeOS (forked NixOS) and bare metal server providers, we are working with the open source developer community to host hackathons where devs can submit their new app templates and get rewarded! Check out our open source bounty platform called Open R&D where you can complete development tasks to earn bounties! These tasks are created, reviewed and funds escrowed in alignment to our Openmesh hackathon initiatives! The first one was completed during the Openmesh Speedhack hackathon at the Chainlink SmartCon HK 2024 event.
The NextJS base template is the foundational code needed to deploy your NextJS application locally and then onto Openmesh bare metal servers.
Xnode NextJS Base Template - Github Repo
This template is provided so you can make your NextJS app Xnode/Nix compatible.
Replace all instances of "xnode-nextjs-template" with the name of your project. This should be unique, as no apps with the same name can be run on a single Xnode.
Build your NextJS app
In case your npm dependencies change, run nix run
in the root folder and replace the npmDepsHash in package.nix with the got hash in the error.
Once your app is ready for deployment and runs using nix run
, push to GitHub and copy your GitHub url (e.g. https://github.com/Openmesh-Network/xnode-nextjs-template).
Go the the App Store in Xnode Studio and go to the advanced tab.
Paste your GitHub url and enter the name of the project you choose during step 1.
Hit deploy and wait for your app to be ready.
Copy the deploy link and replace the one click deployment url in the next section. (to allow others to easily deploy your application)
You can find the one click deploy button at the Github repository readme page (cannot embed the link within Gitbook). When you click it it will quickly deploy this NextJS Base Template to Xnode after you connect your wallet to Xnode Studio.
We are updating XnodeOS to use the latest NixOS features like Flakes. Therefore, if you have any errors that are Flake related please try the following nix run commands:
You can also update the ~/.config/nix/nix.conf file with the following to make it flakes permanent, so that the simple "nix run" will execute successfully:
During our Openmesh developer community hackathons, we have already had submissions for other NextJS base template Forks that you can deploy on top of Openmesh. All community submissions are external to Openmesh (not on the official repo or supported). Please conduct your own due diligence on the code modifications from the base template.