# Create a basic Exhancer app

This tutorial shows you how to create a basic exhancer app. If you haven't read the how to get started guide? Click me

# Imports

import exhancer from "exhancer";
import express from "express";

# Initializing an app


const exhapp = new exhancer.Exhancer();

exhapp.run(3000, () => {
    console.log("Exhancer running on port ::3000");
})

Here new exhancer.Exhancer() is creating a new express application and run method is used to run the application.

# Difference betweeen app.run() & exhapp.run()

app.listen() & exhapp.run() are the same in someway because both are used to run the application but the key difference is that exhancer adds some additional functionality to the application whenever it's starts by the exhapp.run() method.

# Adding middlewares

You can add middlewares to your application by the traditional app.use() method.


const exhapp = new exhancer.Exhancer();

const { app } = exhapp;

app.use(express.json());