alex-009
Is there a function which can print a structure in deno/typscript similar to print_r in php ?
I would like to know which attributes and structure members a struct have and asked my self if there is something similar in deno/typscript to php https://www.php.net/manual/en/function.print-r.php
I use
deno 2.0.0-rc.5
.
Here the code which I use. The questioned line is this console.log(anchorTag.) //<= How to dump anchorTag?
2 replies
Is there a split_to_array function like join_to_string
I need to split a string with some delimiter
=[,
and ask my self if there is something in deno which i can use for this.
https://deno.land/std@0.205.0/collections/join_to_string.ts3 replies
how to set remoteAddr from http header Forwarded for or X-Forwarded for
In some environments are the TCP Client IP not the real Client IP. What's the best way to set https://deno.land/api@v1.38.0?s=Deno.ServeHandlerInfo#prop_remoteAddr from HTTP Header or Proxy protocol https://github.com/haproxy/haproxy/blob/master/doc/proxy-protocol.txt ?
3 replies
Best way for application config in deno/ts?
Hi. I'm alex and quite new to deno/typescript. Thank you for the quite big documenation it is a quite good starting point 🥰
I have created a upload module for caddy server ( https://github.com/git001/caddyv2-upload/ ) and try to "port/migrate/redevelop" this in typescript. Sorry for the long first post, but I'm not sure if this is the right forum, if not please redirect me to the right one 🙂 .
As you may have seen I have a test upload question already asked on gh ( https://github.com/denoland/deno/discussions/20983 ) which was answerd and I was able to make a upload via curl. Now to start a more useable programm I have some newbie questions an hope to get here some answers or pointers from which I can start to learn.
What's the best way to configure a Application, something similar to https://github.com/git001/caddyv2-upload/blob/main/docker-files/opt/webroot/config/Caddyfile which puts the data into this struct https://github.com/git001/caddyv2-upload/blob/main/upload.go#L29-L51 . What I have learned from ( https://www.typescriptlang.org/docs/handbook/ ) is that typescript is a typed js so maybe there is such something similar like the struct in go.
Is there a "best practice" document for Projects which have some frontend/backend code? What I have in mind is such a directory structure
├── backend
├── common
│ └── validators
├── frontend
├── static
├── tests
Thank you that you have read until this line. 🙇
10 replies