logan-api
TypeScript icon, indicating that this package has built-in type declarations

0.1.21 • Public • Published

Logan API

Logan API is a minimal rest API library for projects in Express, Typescript and Mongoose.

Installation

Use the package manager npm to install Logan.

npm install --save logan

or

yarn add logan

Usage

import { Server } from '@pachecoio/logan'

const server = new Server();

@server.get('/')
function hello(req: Request) {
  return 'hello';
}

server.start();

Database connection

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>
...

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i logan-api

Weekly Downloads

1

Version

0.1.21

License

MIT

Unpacked Size

327 kB

Total Files

28

Last publish

Collaborators

  • thisk8brd