Skip to content

A starter for a React Typescript App which includes the server for serving a tailor (Zalondo Mosaic) fragment

Notifications You must be signed in to change notification settings

sbeugen/react-ts-tailor-fragment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run frontend in dev mode

yarn dev

The id of the div inside the body of /public/index.html has to be the same as ELEMENT_ID in index.tsx

Build frontend

yarn build

Run server to serve fragment

After you have built the frontend run yarn serve-fragment

incl. hot reload if either the React files or fragment.ts change

yarn watch-fragment (No need to build the frontend before running this command)

Now tailor can find the fragment at localhost:5000

Setting Port

To set a port other than the default one (5000) simply add PORT=YOUR_PORT_NUMBER before yarn serve-fragment

e.g. PORT=3000 yarn serve-fragment

You have to change the ELEMENT_ID constant in index.tsx accordingly to the id of the div which fragment.ts serves

About

A starter for a React Typescript App which includes the server for serving a tailor (Zalondo Mosaic) fragment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published