Isomor Server
raw JSON → 3.0.4 verified Fri May 01 auth: no javascript
Server-side library for isomor, a framework that abstracts frontend-backend communication layers to allow direct function calls from UI code. Version 3.0.4 is current; release cadence is irregular. Key differentiators: automatic layer generation via Babel transpilation, eliminates REST/GraphQL overhead, strong TypeScript consistency by colocating frontend and backend code. Targets Node >=11.
Common errors
error Cannot find module 'isomor-server' ↓
cause Package not installed or not installed in the correct directory.
fix
Run
npm install isomor-server in your project root. error TypeError: IsomorServer is not a constructor ↓
cause Using CommonJS require() instead of ESM import.
fix
Change
const { IsomorServer } = require('isomor-server') to import { IsomorServer } from 'isomor-server'. error Property 'start' does not exist on type 'typeof IsomorServer' ↓
cause Forgetting to instantiate the class, using it as a static method.
fix
Create an instance:
const server = new IsomorServer({}); server.start(); Warnings
breaking Version 3.0.0 dropped support for Node < 11. ↓
fix Upgrade Node to >= 11.
deprecated The `config` option in constructor is deprecated in 3.0.x; use `options` instead. ↓
fix Replace `new IsomorServer({ config: {...} })` with `new IsomorServer({...})`.
gotcha Requires isomor-transformer to be installed as a peer dependency (automatically with isomor). ↓
fix Install isomor-transformer: npm install isomor-transformer
Install
npm install isomor-server yarn add isomor-server pnpm add isomor-server Imports
- IsomorServer wrong
const { IsomorServer } = require('isomor-server')correctimport { IsomorServer } from 'isomor-server' - default import wrong
const isomorServer = require('isomor-server')correctimport isomorServer from 'isomor-server' - type imports wrong
import { IsomorServerOptions } from 'isomor-server' (if used at runtime)correctimport type { IsomorServerOptions } from 'isomor-server'
Quickstart
import { IsomorServer } from 'isomor-server';
const server = new IsomorServer({
port: 4000,
// other options
});
server.start();