This uses Next.js as a base project for creating a SaaS appliation with Nile
First, you need to create certificates for your local machine and accept them. The Nile backend will only serve cookies to \*.thenile.dev
domains, which is required for login
-
edit
/etc/hosts
and add127.0.0.1 local.thenile.dev
. -
mkdir .certificates && cd .certificates
-
add an ssl key (this one lasts 1 year)
openssl req -x509 -out localhost.crt -keyout localhost.key \ -days 365 \ -newkey rsa:2048 -nodes -sha256 \ -subj '/CN=*.thenile.dev' -extensions EXT -config <( \ printf "[dn]\nCN=*.thenile.dev\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:*.thenile.dev\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
-
$ open localhost.crt
, double click on the certificate in your keychain. -
Open the dropdown for
Trust
in the pop up window and selectAlways Trust
.
npm run dev
# or
yarn dev
Open https://local.thenile.dev with your browser to see the result.
You can start editing the page by configuring the workspace to use in pages/_app.tsx
. The page auto-updates as you edit the file.
To learn more about Nile, take a look at the following resources:
- Nile Documentation - learn about Nile concepts, features, and API.
- Learn Nile - an interactive Nile tutorial for building a control plane.
- Building UI - learn about Joy UI and the build in components to style your application
You can check out the Nile js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.