Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattwelke/example-react-server-views-typescript
Finished code for the "Strongly-Typed, Server-Rendered Views with React and TypeScript" blog post.
https://github.com/mattwelke/example-react-server-views-typescript
node react server-side-rendering templating typescript
Last synced: about 1 month ago
JSON representation
Finished code for the "Strongly-Typed, Server-Rendered Views with React and TypeScript" blog post.
- Host: GitHub
- URL: https://github.com/mattwelke/example-react-server-views-typescript
- Owner: mattwelke
- License: unlicense
- Created: 2018-03-15T00:28:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T17:33:55.000Z (12 months ago)
- Last Synced: 2024-10-14T02:24:19.409Z (3 months ago)
- Topics: node, react, server-side-rendering, templating, typescript
- Language: TypeScript
- Homepage: https://mattwelke.com/node.js/typescript/react/2018/03/11/strongly-typed-server-rendered-views-with-react-and-typescript.html
- Size: 364 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# example-react-server-views-typescript
Finished code for the [Strongly-Typed, Server-Rendered Views with React and TypeScript](https://mattwelke.com/node.js/typescript/react/2018/03/11/strongly-typed-server-rendered-views-with-react-and-typescript.html) blog post.
## Setup
1. Make sure you've got Node.js installed on your machine. [n](https://github.com/tj/n) is a great way to do that.
1. In the project directory, run `yarn` or `npm install`.
1. In the project directory, run `./node_modules/typescript/bin/tsc` to compile the app.
1. In the project directory, run `node dist/main.js` to run the app.Note that IDEs such as Visual Studio Code and WebStorm will perform certain steps that will make some of the above steps unneccessary. When in doubt, consult the documentation for your tools.
### Windows Issues
Note that Windows users may have trouble running the TypeScript compiler from the command line, unless they choose to install TypeScript globally on their system. In my experience, the default build task that Visual Studio Code produces for TypeScript Node.js projects will do the trick. If you use Visual Studio Code on Windows, use the keyboard shortcut `ctrl-shift-b` and hit `enter`, or run the task through the appropriate menu option. WebStorm will also work, but make sure to remove the `"esModuleInterop": true` property from the `tsconfig.json` if present due to a limitation in WebStorm.
## Help
Any issues running it? Open an issue!