Logan API is a minimal rest API library for projects in Express, Typescript and Mongoose.
Use the package manager npm to install Logan.
npm install --save logan
or
yarn add logan
import { Server } from '@pachecoio/logan'
const server = new Server();
@server.get('/')
function hello(req: Request) {
return 'hello';
}
server.start();
To connect with a Mongo Database, it is as simple as having a running instance of MongoDB ready and updating the url under the .env
file
# .env
MONGODB_URI=<YOUR MONGODB URI>
...
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.