Quick Start

Create a minimal Newgate API in seconds.

1. Initialize Project

Create a new directory and initialize your project:

mkdir my-newgate-app
cd my-newgate-app
npm init -y
npm install newgatejs

2. Create Server

Create a file named server.js with the following content:

import App from 'newgatejs';

const app = new App();

// Basic route
app.get('/', (req, res) => {
    res.json({ message: "Hello from Newgate!" });
});

// Start server
app.listen(3000, () => {
    console.log('Server running at http://localhost:3000');
});

3. Run

Start your server:

node server.js

4. Test

Open another terminal and test your endpoint:

curl http://localhost:3000
# Output: {"message":"Hello from Newgate!"}
Last updated: 12/11/2025 Edit on GitHub