digitallyinduced / ihp

🔥 The fastest way to build type safe web apps. IHP is a new batteries-included web framework optimized for longterm productivity and programmer happiness
https://ihp.digitallyinduced.com/
MIT License
4.91k stars 195 forks source link

Remove `%` from sessionSecret #1963

Closed amitaibu closed 4 months ago

amitaibu commented 4 months ago

This is the output I get when I execute on Ubuntu:

$ new-session-secret
vKfe21qHkQwwLAf+vWVEhywVMujoZlsg2ZBRuIKlrAfM4TlGgaaj5MOfplDdmpOlkqTkAttpy32GnLhPIwiF7+kB+e4ofoyOkqWNz9//pZts7jxkdgOc8MoY7FY3FH8F%   

Notice the % on the end. PR is an attempt to add a new line at the end of the string.

However, I don't know how to execute this locally to test it.

mpscholten commented 4 months ago

Thanks! 👍 Looks good to me.

For testing you should be able to load this into ghci from within your IHP directory:


cd ihp
ghci
:l exe/IHP/CLI/NewSessionSecret.hs
amitaibu commented 4 months ago

I'm getting an error

image

mpscholten commented 4 months ago

Did you start ghci from within the IHP folder? There the .ghci file should enable the BlockAguments extension via https://github.com/digitallyinduced/ihp/blob/master/.ghci#L32

amitaibu commented 4 months ago

I missed chmod go-w .ghci

Now it's working well.

ghci> main
IerLodatg74w7ktiw75uJiMkXbyN6XHhgD4tEUTIn3Ztg9L9QE8m372rWWHm7rSpz2sMNYpnDaH4UflIlDmh9u1/Xz0dAyyj3OhZx6kyYF3G08r5wKNpjSLLHludPL+N
ghci>