-
-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1 addition
and
2,000 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,3 @@ | ||
<img style="width: 100%; max-width: 400px;" src="http://feathersjs.com/img/feathers-logo-wide.png" alt="Feathers logo"> | ||
|
||
## A framework for real-time applications and REST APIs with Deno | ||
|
||
This folder contains the Deno build of Feathers. | ||
|
||
## Use with Deno | ||
|
||
```ts | ||
// app.ts | ||
import { feathers } from 'https://deno.land/x/[email protected]/mod.ts'; | ||
|
||
type Message = { | ||
message: string; | ||
} | ||
|
||
class MyService { | ||
async create (data: Message) { | ||
return data; | ||
} | ||
} | ||
|
||
type ServiceTypes = { | ||
myservice: MyService | ||
} | ||
|
||
const app = feathers<ServiceTypes>(); | ||
|
||
app.use('myservice', new MyService()); | ||
|
||
app.service('myservice').on('created', (data: Message) => { | ||
console.log('Created', data); | ||
}); | ||
|
||
await app.service('myservice').create({ | ||
message: 'Hello from Deno' | ||
}); | ||
``` | ||
> **Important:** An experimental Deno first implementation is currently under development at https://github.com/feathersjs/feathers/pull/2828 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.