Skip to content
inkanjsPublic

About

inkan.dev: the website and docs of inkan, the API framework for Node where the docs can't lie

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

inkan.dev

The website of inkan, the API framework for Node where the docs can't lie: the landing page, the docs, and a playground that talks to a real inkan app.

It runs on Next.js, and its API is an inkan app (server/app.ts) served through @inkanjs/next. The docs are MDX under content/docs, read by Fumadocs. The animations are Motion, the clips under "under the hood" are Remotion scenes played in the page.

Develop

npm install
npm run dev

http://localhost:3000 is the site, /docs the docs, /api/docs the docs of the playground API. npm run check runs the API's examples as tests.

Run it

npm ci
npm run build
npm start

The build is a standalone Next.js server in .next/standalone, with public/ and .next/static copied next to it: the folder is the whole site. npm start runs it on PORT (default 3000) and HOSTNAME (default 0.0.0.0):

PORT=3000 npm start

Kept running by systemd, pm2 or a container like any Node server, or under warden: warden run -- npm start.

Build on the machine it runs on (a Raspberry Pi builds it fine, only slower): the standalone folder carries the node_modules it needs, for the platform it was built on.

On Vercel

Import the repository on vercel.com: it finds Next.js and builds it as it is, with no settings to change. The standalone folder is made only off Vercel, which serves the build itself. Set GITHUB_TOKEN (a fine-grained token with read access to public repositories is enough) so the community page is not held to GitHub's 60 asks an hour per address.

The playground API keeps its teas in memory, and on Vercel every function instance has its own: a new instance starts from the shelf as it ships. That is all the playground needs.

Layout

app/              pages: the landing page, /docs, /api (the inkan app), /api/search
components/       the landing page's sections, the Remotion scenes, the code windows
content/docs/     the docs, as MDX
server/app.ts     the playground API, an inkan app
scripts/          the step after next build that makes .next/standalone whole

About

inkan.dev: the website and docs of inkan, the API framework for Node where the docs can't lie

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages