{"id":49720,"library":"webframe-base","title":"Webframe Base","description":"Webframe Base is a Node.js framework designed for building RESTful APIs and systems. It provides a minimalistic structure for routing, middleware, and request handling. The current stable version is 0.7.23, released with an unspecified cadence. It focuses on simplicity and extensibility, differing from larger frameworks like Express by offering a more lightweight core with fewer built-in features, suitable for microservices and small to medium projects. The framework supports both CommonJS and ESM modules, and includes basic error handling and logging capabilities.","status":"active","version":"0.7.23","language":"javascript","source_language":"en","source_url":"git://github.com/comunity/webframe-base","tags":["javascript"],"install":[{"cmd":"npm install webframe-base","lang":"bash","label":"npm"},{"cmd":"yarn add webframe-base","lang":"bash","label":"yarn"},{"cmd":"pnpm add webframe-base","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM is preferred; CommonJS require works with .default for default exports but Server is named.","wrong":"const Server = require('webframe-base').Server","symbol":"Server","correct":"import { Server } from 'webframe-base'"},{"note":"Router is a named export, not default.","wrong":"import Router from 'webframe-base'","symbol":"Router","correct":"import { Router } from 'webframe-base'"},{"note":"TypeScript users should import type if needed: import type { Request } from 'webframe-base'.","wrong":"const { Request } = require('webframe-base')","symbol":"Request","correct":"import { Request } from 'webframe-base'"},{"note":"Same as Request import pattern.","wrong":"const { Response } = require('webframe-base')","symbol":"Response","correct":"import { Response } from 'webframe-base'"}],"quickstart":{"code":"import { Server, Router } from 'webframe-base';\n\nconst app = new Server();\n\nconst router = new Router();\nrouter.get('/hello', (req, res) => {\n  res.send({ message: 'Hello, world!' });\n});\n\napp.use(router);\n\napp.listen(3000, () => {\n  console.log('Server running on port 3000');\n});","lang":"typescript","description":"This example sets up a basic REST server with a single GET endpoint that returns a JSON response."},"warnings":[{"fix":"Use the built-in parseBody option when creating the server: new Server({ parseBody: true })","message":"The 'bodyParser' middleware has been deprecated in favor of built-in body parsing in v0.7.0.","severity":"deprecated","affected_versions":">=0.7.0"},{"fix":"Add error handling middleware using router.use((err, req, res, next) => { ... })","message":"In v0.6.0, error handling changed: errors must be explicitly caught with .catch on routes, the global error handler is removed.","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"npm install --save-dev @types/webframe-base","message":"When using TypeScript, the framework types are not shipped; you need to install @types/webframe-base separately.","severity":"gotcha","affected_versions":"0.x"},{"fix":"Replace createServer() with new Server()","message":"The 'createServer' function was deprecated in v0.5.0; use 'new Server()' instead.","severity":"deprecated","affected_versions":">=0.5.0"},{"fix":"Place specific routes before wildcard routes.","message":"Route order matters: routes defined after a catch-all route will not be matched.","severity":"gotcha","affected_versions":"0.x"}],"env_vars":null,"search_vec":"'0.7.23':32 'api':13 'base':2,4 'basic':80 'build':11 'built':59 'built-in':58 'cadenc':37 'capabl':85 'commonj':74 'core':55 'current':28 'design':9 'differ':44 'error':81 'esm':76 'express':49 'extens':43 'featur':61 'fewer':57 'focus':39 'framework':8,47,71 'handl':26,82 'includ':79 'javascript':86 'larger':46 'lightweight':54 'like':48 'log':84 'medium':68 'microservic':64 'middlewar':23 'minimalist':19 'modul':77 'node.js':7 'offer':51 'project':69 'provid':17 'releas':33 'request':25 'rest':12 'rout':22 'simplic':41 'small':66 'stabl':29 'structur':20 'suitabl':62 'support':72 'system':15 'unspecifi':36 'version':30 'webfram':1,3","created_at":"2026-06-07T17:03:15.353270+00:00","updated_at":"2026-06-07T17:03:15.353270+00:00","problems":[{"fix":"Use import { Server } from 'webframe-base' instead of import Server from 'webframe-base'","cause":"Incorrect import: using default import when Server is a named export.","error":"TypeError: Server is not a constructor"},{"fix":"Use a different port or kill the existing process: lsof -i :3000, then kill -9 <PID>","cause":"Port already in use by another process.","error":"Error: listen EADDRINUSE :::3000"},{"fix":"Run npm install webframe-base and optionally npm install --save-dev @types/webframe-base","cause":"Package not installed or missing TypeScript types.","error":"Cannot find module 'webframe-base' or its corresponding type declarations"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/comunity/webframe-base","github":"git://github.com/comunity/webframe-base","docs":null,"changelog":null,"pypi":null,"npm":"webframe-base","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}