Node.js
create-modelence-app
command.
my-app
with the necessary files and folders for your project.
Client Files
client/index.html
The main layout for your application. You usually don’t need to edit this file.client/index.css
Global CSS styles, including Tailwind CSS configuration.client/index.tsx
Entry point for your React frontend where you initialize the client app.client/routes.ts
Define your client-side routes and their corresponding components.Server Files
server/app.ts
Server entry point where you configure your backend modules and start the server.Config Files
.modelence.env
Environment variables for your application (including API tokens for applications connected to Modelence Cloud)src/client
directory, while server-side code belongs in src/server
.
Modelence uses a clear separation between client and server code to help maintain a clean architecture.
You can also use any other directories at the same level as src/client
and src/server
for shared code between client and server.Install dependencies
Run the development server
npm run dev
command builds your website locally and serves it through a Vite development server,
ready for you to view at http://localhost:3000/ (or the port you specified in the .env
file).View your application