SuperAPI AI Directory

node-and-js-frameworks

Frontend & websites

View repository

Updated 10-15 17:28

About this skill

Installing Node.js

Install Node.js using nodeenv via uvx:

uvx nodeenv -n lts ~/node
mkdir -p ~/.local/bin
ln -sf ~/node/bin/node ~/.local/bin/node
ln -sf ~/node/bin/npm ~/.local/bin/npm
ln -sf ~/node/bin/npx ~/.local/bin/npx

This installs the latest LTS version of Node.js into ~/node and symlinks the binaries into ~/.local/bin (which is on PATH).

Running a JS framework dev server on an exe.dev VM

You need to add the full hostname (and hostname:port) to the allowed origins lists.

Next.js (>= 15.2)

// next.config.js
module.exports = {
  allowedDevOrigins: [
    '<vmname>.exe.xyz',
    '<vmname>.exe.xyz:<port>',
  ],
};
npx next dev -H 0.0.0.0 -p 8000

Vite (>= 5.0)

// vite.config.js
import { defineConfig } from 'vite';

export default defineConfig({
  server: {
    host: '0.0.0.0',
    port: 5173,
    allowedHosts: ['<vmname>.exe.xyz'],
  },
});