Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 20 days 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.

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`