Lithent-Ssr-Boilerplate
is a boilerplate designed for building server-side rendering (SSR) websites using the Lithent UI library.
This project is still experimental and is currently tightly coupled with Express
npx create-lithent-ssr@latest
cd project-name
npm install
npm run dev
The build files will be generated in the dist
directory.
npm run build
npm run start
Routing is determined by the filenames under the /src/pages/
directory. The routing behavior is as follows:
-
src/pages/index.tsx
maps to the root URL:http://localhost:3000
. -
A file with a specific name like
one.tsx
will create a static route. For example:src/pages/one.tsx
maps tohttp://localhost:3000/one
.
-
Files with dynamic segments are defined by using an underscore (
_
) in the filename. For example:src/pages/index._type.tsx
maps to a dynamic route likehttp://localhost:3000/:type
.
-
You can chain dynamic segments for more complex routes. For example:
src/pages/one._type._name.tsx
maps tohttp://localhost:3000/one/:type/:name
.
These routing patterns allow you to create both static and dynamic URLs with flexibility in your project structure.
This template includes state-ref, a lightweight state management library, already configured to simplify your development experience. It provides an intuitive API for managing and sharing state across components, making your application more predictable and maintainable.
This template comes with Tailwind CSS already configured for a simple default starting experience.