1.0.5 • Published 3 years ago
@ray.js/cli v1.0.5
Ray.js
Javascript rendering server
Get started
- Install globally
npm i -g @ray.js/cli- Init a new project
ray init- Start the server
ray startServer
- Supported entry file-types:
.html.md.js.jsx.ts.tsx - Resolves both
/route/index.extand/route.ext - If a
routesdir presents, all routes will default to it - A route to a static asset must include
/public/in pathname
www
├─ public
│ └─ styles.scss
├─ about
│ └─ index.html
└─ index.jsx// www/index.jsx
export default (req, res) => {
req.config // configuration object
req.params // parsed query parameters
req.cookie // parsed cookie
res.json(object) // json response helper
res.redirect(url) // redirect helper
res.jsx(component) // render jsx to html
res.image(component) // render jsx to image
}Dependencies
astring
chokidar
cli-color
esbuild
highlight.js
html-tags
marked
meriyah
mime
sass
selenium-webdriver
sharp
svgo
ws
