Skip to content

AliceCengal/express-preact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express and Preact-cli project

Features:

  • full typescript
  • Prisma ORM with sqlite example database
  • basic registration and login using cookie-session
  • controller pattern
  • Frontend
    • Preact app
    • automatic build optimization via preact-cli
    • react-query
    • custom hooks: useForm
    • Bootstrap Reboot
    • CSS modules
    • Google Material icons: https://fonts.google.com/icons

Top level script is an Express app. yarn start or npm run start evokes a server that listens to the specified port, or on 3000. This server serves the /api route.

For development, start the /frontend server via yarn dev or npm run dev. The Express server redirects all / requests to the frontend server at :8080.

For production, yarn build or npm run build in the /frontend directory, which bundles the frontend app to /frontend/build. The Express server will statically serve this build directory.

Initial template commands

npx express-generator --no-view express-preact
cd express-preact
npx preact-cli create typescript frontend

Build commands

npx prisma generate
npx prisma db push
npx prisma db seed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published