adeelibr / deno-playground Goto Github PK
View Code? Open in Web Editor NEWdeno playground repo
deno playground repo
{
"todo":"吃饭"
}
{
"success": false,
"message": "Error: Error: Column 'todo' cannot be null"
}
The same code as the author, Why does the error message keep coming up?
in CreateTodo if you post the json with single quotes in todo , it throws internal server error. How can we catch this and display a message gracefully.
{
"todo": 'text in single quotes' ,
"isCompleted": false
}
https://www.freecodecamp.org/news/create-a-todo-api-in-deno-written-by-a-guy-coming-from-node/
The project does not compile
TS2339 [ERROR]: Property 'secure' does not exist on type 'ApplicationErrorEvent<Record<string, any>>'.
app.addEventListener("listen", ({ secure, hostname, port }) => {
~~~~~~
at file:///Volumes/data01/projects/projects_js/learn-deno/learn_oak/deno-playground/chapter_1:oak/server.ts:24:35
TS2339 [ERROR]: Property 'hostname' does not exist on type 'ApplicationErrorEvent<Record<string, any>>'.
app.addEventListener("listen", ({ secure, hostname, port }) => {
~~~~~~~~
at file:///Volumes/data01/projects/projects_js/learn-deno/learn_oak/deno-playground/chapter_1:oak/server.ts:24:43
TS2339 [ERROR]: Property 'port' does not exist on type 'ApplicationErrorEvent<Record<string, any>>'.
app.addEventListener("listen", ({ secure, hostname, port }) => {
~~~~
at file:///Volumes/data01/projects/projects_js/learn-deno/learn_oak/deno-playground/chapter_1:oak/server.ts:24:53
Found 4 errors.
Using the colon ':' character for directory names means that the repository cannot be cloned on Windows systems.
Example error:
error: invalid path 'chapter_1:oak/README.md'
Example command to reproduce:
git clone https://github.com/adeelibr/deno-playground.git
Command results:
Cloning into 'deno-playground'...
remote: Enumerating objects: 131, done.
remote: Counting objects: 100% (131/131), done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 131 (delta 50), reused 110 (delta 30), pack-reused 0
Receiving objects: 100% (131/131), 4.52 MiB | 2.53 MiB/s, done.
Resolving deltas: 100% (50/50), done.
error: invalid path 'chapter_1:oak/README.md'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
updateTodoById does not update. todo and boolean value.
On default, when a user adds the following into postman:
{
"todo": "eat a lama"
}
The following result does not contain the new todo item.
{
"success": true,
"data": [
{
"id": "53706530-3930-4ecd-9933-09de0c54388c",
"todo": "walk dog",
"isCompleted": true
},
{
"id": "23462078-3a14-44ee-a161-7e56d805b901",
"todo": "eat food",
"isCompleted": false
},
{
"id": "d9b3ff7a-1fc9-40dc-b12f-b10a89f1d212",
"todo": "exercise",
"isCompleted": true
},
{
"id": "cf00b251-3adc-4b73-b3ec-3d6ba580f9ed",
"todo": "read a book",
"isCompleted": false
},
{
"id": "795accc2-706b-4083-8c89-2233de0a2c09",
"isCompleted": false
}
]
}
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.