Skip to content

apprunjs/apprun-antd-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppRun + Ant Design Pro Components

This site is built with AppRun-Site and Ant Design ProComponents.

It has the following structure:

/api                <- backend code
  /comic.js         <- demo API
/pages              <- fronet end code
  /index.html       <- main page, load in the browser
  /index.tsx        <- home page
  /about
    /index.tsx      <- about page
  /contact
    /index.tsx      <- contact page
  /components
    /comic.tsx      <- demo component
    /layout.tsx     <- layout component
  /main.tsx         <- start up code, renders the layout
/public             <- generated site for production
/server.js          <- generated server

You can add pages under the pages directory by creating sub-directories and add an index.tsx in it.

Then, you can use:

  • npm start to start the dev server
  • npm run dev to start building in watch mode
  • npm run build to build for production

Note: AppRun-Site does not support React live refresh yet. You will need to refresh the browser to see the changes.

Also, Ant Design ProComponents does not support server-side rendering (SSR). SSR is disabled in the server.js file.

import server from 'apprun-site/server.js';
const port = process.env.PORT || 8080;
const app = server({ no_ssr: true });
app.listen(port, () => console.log(`Your app is listening on http://localhost:${port}`));

Have fun anyway!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published