https://github.com/valentinjdt/configurable-reactjs-typescript-template
Ce dépôt contient un template ReactJS avec Typescrit et les fichiers de déploiement Docker. Un système de configuration modifiable après la mise en production docker est disponible.
https://github.com/valentinjdt/configurable-reactjs-typescript-template
configuration deployment docker npm react reactjs template typescript
Last synced: 2 months ago
JSON representation
Ce dépôt contient un template ReactJS avec Typescrit et les fichiers de déploiement Docker. Un système de configuration modifiable après la mise en production docker est disponible.
- Host: GitHub
- URL: https://github.com/valentinjdt/configurable-reactjs-typescript-template
- Owner: ValentinJDT
- Created: 2024-10-08T09:28:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-19T11:30:57.000Z (over 1 year ago)
- Last Synced: 2025-01-29T23:42:22.048Z (over 1 year ago)
- Topics: configuration, deployment, docker, npm, react, reactjs, template, typescript
- Language: TypeScript
- Homepage:
- Size: 521 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ReactJS Typescript Template
## Local start
Command `npm run start` or `npm run dev`
## Change default path
Edit `homepage` in package.json.
Edit browser router `basename` in App.ts.
Edit `try_files` path in nginx.conf.
Edit `/usr/share/nginx/html/` in Dockerfile.
## Configuration
Edit/add default configuration files in `/public/default`.
If the edited configuration(s) doesn't/don't exist, it falls back to the default configuration(s).
If you want to add configuration file, add json file in `/public/default`, and add filename in `CONFIG_FILES` array in `/src/contexts/ConfigContext.ts`. If anyone wants to automate this step, do a pull request !
Use `useConfig` to acces to configuration.
## Build prod
Command `npm run build:prod`
## Docker image
Create image : `npm run build:docker`
Push image : `npm run publish:docker`