This repository has been archived by the owner on Sep 24, 2021. It is now read-only.
Build out full server (not just functions) #20
Labels
enhancement
New feature or request
ideas wanted
Needs imaginative ideas to make work
server-side-rendering
Server based render methods
Currently Prism only outputs functions. And they can be imported so they can be used with a
express
or any other backend js framework to render body. e.g:This is great, you get the benefits of prism automating of synchronisation of client side render functions and server side render functions.
But Prism can do a little more here. It already knows what url routes to which pages. And its a compiler so its really good at generating code. So Prism could generate a whole express or oak application.
This could be implemented through a setting:
and the server runtime settings (
port
,hostname
, ...) would be pulled in at runtime throughprocess.env
(orDeno.env.get(*)
) or do defaults. It would compile inload
callbacks of page components.This would make it really simple to spin up a isomorphic project with Prism really quickly.
There is a bunch of things that would not be implemented. Things such as cookies, headers, separate server specific load functions and others. ands that's fine as this feature is not for building complex sites. It is just for getting a Prism app working on the server without having to manually build an express app to do so.
The text was updated successfully, but these errors were encountered: