Web Server Tutorial Tries to Write to Library Directory
30 views
Skip to first unread message
Adam Golding
unread,
Dec 22, 2020, 4:56:48 AM12/22/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Racket Users
I'm a little confused by this tutorial--when I run the 'persistent model' in section 14 it tries to write a file to the read-only directory the web-server library itself is in...
but grabbing the current directory before it loads the web server doesn't seem to work--how do I modify it to make it write to the same folder as the .rkt file?
Sam Tobin-Hochstadt
unread,
Dec 22, 2020, 9:40:10 AM12/22/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Adam Golding, Racket Users
I believe this is a bug in `web-server/insta`, but here's a workaround:
Add the following to the beginning of the `app` module:
(require racket/runtime-path)
(define-runtime-path here ".")
Then use `here` instead of `(current-directory)` in the `start` function.