kryz81 / deno-api-example Goto Github PK
View Code? Open in Web Editor NEWExample of a small API build with Deno and Oak
Example of a small API build with Deno and Oak
@kryz81 Thank you very much for a great example. I am as TDD fan always look at new technology how I can write tests for it. Can you point me to some examples with tests or can I try to came with tests here?
I wanted to play around with your nicely crafted example but I got a little stuck.
Am I running this the wrong way?
Is there an expected configuration to loosen the TypeScript checks?
Does this example expect an older version of Deno? (or TS?)
Sorry for so many questions. JS/TS is out of my comfort zone.
F:\git\deno-api-example [master ≡]> deno --version
deno 0.34.0
v8 8.1.108
typescript 3.7.2
F:\git\deno-api-example [master ≡]> deno run .\index.ts
Compile file:///F:/git/deno-api-example/index.ts
error TS7031: Binding element 'request' implicitly has an 'any' type.
► file:///F:/git/deno-api-example/handlers/createUser.ts:3:25
3 export default async ({ request, response }) => {
~~~~~~~
error TS7031: Binding element 'response' implicitly has an 'any' type.
► file:///F:/git/deno-api-example/handlers/createUser.ts:3:34
3 export default async ({ request, response }) => {
~~~~~~~~
error TS7031: Binding element 'params' implicitly has an 'any' type.
► file:///F:/git/deno-api-example/handlers/deleteUser.ts:3:25
3 export default async ({ params, response }) => {
Plus several other examples of the same issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.