The template viewer is modeled after the filmstrip folder view in Windows Explorer.
The application is divided into three main services that are designed to operate decoupled from each other.
website-template-client
website-template-server
website-template-server
- cdn
- pm2
- .env file for website-template-client
- config directory setup for client and server directories
### Code Structure
website-template-viewer
|-- client
| |
| |--config
| |
| |--src
| |
| |--.env
| |
|---server
| |
| |--cdn
| |
| |--config
| |
| |--src
| | |
| | |--resolvers
| | |
| | |--schema
| | |
| | |--server.ts
To run the application locally you will need the following global node packages
- pm2 (Node process)
npm install -g pm2
- Run the graphql server and local cdn
- Run the client application
cd server
npm i
npm run start:dev-cdn
cd client
npm i
npm run start
The React application requires a .env file.
./client/.env
----
REACT_APP_CDN_URL=http://localhost:4001
REACT_APP_GRAPHQL_URL=http://localhost:4000/graphql
** The CDN is intended only for development mode and serves the images