Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scriptex/deno-rest-api

An example REST API implementation for Deno using Oak framework
https://github.com/scriptex/deno-rest-api

deno oak rest-api

Last synced: about 1 month ago
JSON representation

An example REST API implementation for Deno using Oak framework

Awesome Lists containing this project

README

        

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/34d3d75710534dc6a38c3584a1dcd068)](https://www.codacy.com/gh/scriptex/deno-rest-api/dashboard?utm_source=github.com&utm_medium=referral&utm_content=scriptex/deno-rest-api&utm_campaign=Badge_Grade)
[![Codebeat Badge](https://codebeat.co/badges/d765a4c8-2c0e-44f2-89c3-fa364fdc14e6)](https://codebeat.co/projects/github-com-scriptex-deno-rest-api-master)
[![CodeFactor Badge](https://www.codefactor.io/repository/github/scriptex/deno-rest-api/badge)](https://www.codefactor.io/repository/github/scriptex/deno-rest-api)
[![DeepScan grade](https://deepscan.io/api/teams/3574/projects/5257/branches/40799/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=3574&pid=5257&bid=40799)
[![Analytics](https://ga-beacon-361907.ew.r.appspot.com/UA-83446952-1/github.com/scriptex/deno-rest-api/README.md?pixel)](https://github.com/scriptex/deno-rest-api/)

# Deno REST API

A simple REST API starter kit implementation in [Deno](https://deno.land/)
environment using [OAK](https://oakserver.github.io/oak/) as middleware
framework.

The app contains basics CRUD operations managing a Book entity using at the
moment a simple Interface for modeling the REST Entity with read and write
operation in an array collection.

## Visitor stats

![GitHub stars](https://img.shields.io/github/stars/scriptex/deno-rest-api?style=social)
![GitHub forks](https://img.shields.io/github/forks/scriptex/deno-rest-api?style=social)
![GitHub watchers](https://img.shields.io/github/watchers/scriptex/deno-rest-api?style=social)
![GitHub followers](https://img.shields.io/github/followers/scriptex?style=social)

## Code stats

![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/scriptex/deno-rest-api)
![GitHub repo size](https://img.shields.io/github/repo-size/scriptex/deno-rest-api?style=plastic)
![GitHub language count](https://img.shields.io/github/languages/count/scriptex/deno-rest-api?style=plastic)
![GitHub top language](https://img.shields.io/github/languages/top/scriptex/deno-rest-api?style=plastic)
![GitHub last commit](https://img.shields.io/github/last-commit/scriptex/deno-rest-api?style=plastic)

TODO: Add database and authentication support.

## Prerequisites

1. [Install Deno](https://deno.land/#installation)

### Shell (Mac, Linux):

```sh
curl -fsSL https://deno.land/x/install/install.sh | sh
```

### PowerShell (Windows):

```sh
iwr https://deno.land/x/install/install.ps1 -useb | iex
```

### Homebrew (Mac):

```sh
brew install deno
```

### Chocolatey (Windows):

```sh
choco install deno
```

### Scoop (Windows):

```sh
scoop install deno
```

### Build and install from source using Cargo

```sh
cargo install deno
```

2. Configure your IDE. I am using VSCode so I installed the
[official Deno extension](https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno)
from the Visual Studio Marketplace. Then I followed the setup instructions:

## Usage

Lint using Deno's built in linter

```sh
./scripts/lint.sh
```

Format using Deno's built in formatter

```sh
./scripts/format.sh
```

Start your server on port 5000

```sh
./scripts/run.sh
```

Compile into a single executable

```sh
./scripts/compile.sh
```

## LICENSE

MIT

---


Connect with me:






 



 



 



 



 



 



 



 



 



 



 



---


Support and sponsor my work: