Get started with feathers CDN

MIT licensed

Feathers: Lightweight Node.js for simple, real-time APIs, compatible with popular tech.

Tags:
  • feathers
  • REST
  • socket.io
  • realtime

Stable version

Copied!

How to start using feathers CDN


// Import required Feathers modules
import express from '@feathersjs/express';
import bodyParser from '@feathersjs/bodyparser';
import cors from '@feathersjs/cors';
import { Application } from '@feathersjs/feathers';

// Initialize the application and configure middleware
const app: Application = express(feathers());
app.use(bodyParser.json());
app.use(cors());

// Define a simple service
app.use('/users', {
  async find() {
    return [{ id: 1, name: 'John Doe' }];
  },
});

// Start the server
const port = process.env.PORT || 3030;
app.listen(port, () => {
  console.log(`Feathers server listening on port ${port}`);
});
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions