Finished code for the "Strongly-Typed, Server-Rendered Views with React and TypeScript" blog post.
Switch branches/tags
Nothing to show
Clone or download
welkie Merge pull request #25 from welkie/dependabot/npm_and_yarn/@types/rea…
…ct-16.7.13

Bump @types/react from 16.7.12 to 16.7.13
Latest commit c21b947 Dec 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Finalize. Mar 16, 2018
.gitignore uploaded Mar 15, 2018
LICENSE Relicense, switch to NPM, cleanup. Aug 26, 2018
README.md Update README.md Oct 14, 2018
package-lock.json
package.json Bump @types/react from 16.7.12 to 16.7.13 Dec 10, 2018
tsconfig.json uploaded Mar 15, 2018

README.md

example-react-server-views-typescript

Finished code for the Strongly-Typed, Server-Rendered Views with React and TypeScript blog post.

Setup

  1. Make sure you've got Node.js installed on your machine. n is a great way to do that.
  2. In the project directory, run yarn or npm install.
  3. In the project directory, run ./node_modules/typescript/bin/tsc to compile the app.
  4. 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!