https://github.com/iris-contrib/react-typescript-template
React & Typescript template for Iris CLI
https://github.com/iris-contrib/react-typescript-template
iris iris-cli iris-golang
Last synced: 3 months ago
JSON representation
React & Typescript template for Iris CLI
- Host: GitHub
- URL: https://github.com/iris-contrib/react-typescript-template
- Owner: iris-contrib
- License: mit
- Created: 2020-01-04T05:01:24.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-11-05T20:43:47.000Z (about 2 years ago)
- Last Synced: 2024-11-13T15:39:03.355Z (about 1 year ago)
- Topics: iris, iris-cli, iris-golang
- Language: TypeScript
- Homepage: https://github.com/kataras/iris-cli
- Size: 520 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# react-typescript app
[](https://github.com/iris-contrib/react-typescript-template/actions) [](https://goreportcard.com/report/github.com/iris-contrib/react-typescript-template)
This is a project template for [Iris](https://iris-go.com) with [React](https://reactjs.org/) & [Typescript](https://www.typescriptlang.org/) apps.
## Prerequisites
You will need to have:
- [Node.js](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/getting-started/migration) to build the frontend application.
- [Go](https://golang.org) to run the web server.
- Go-Bindata tool to embed the frontend app to the final build. Install it with the following Go command:
```sh
go install github.com/go-bindata/go-bindata/v3/go-bindata@latest
```
## Get started
Install & run the template with [Iris CLI](https://github.com/kataras/iris-cli):
```sh
iris-cli run react-typescript
```
details...
Install the dependencies and build with [Yarn](https://yarnpkg.com/lang/en/)...
```sh
cd app
yarn install
yarn build
cd ../
```
...then **start the Iris web server**:
```sh
go-bindata -prefix "app/build" -fs ./app/build/...
go run .
```
Navigate to [localhost:8080](http://localhost:8080). You should see your app running.