Skip to content

Latest commit

 

History

History
90 lines (65 loc) · 3.03 KB

README.md

File metadata and controls

90 lines (65 loc) · 3.03 KB

FAST FullStack React with TypeScript starter kit.


Quick Start

Just clone this repository into your own project folder. and start working

git clone https://github.com/gilamran/fullstack-typescript.git <MyProjectName>
cd <MyProjectName>
npm install
npm run dev

If you want to detach from this repository into your own repository do this:

git remote remove origin
git remote add origin YOUR_REPO_URL
git push -u origin master

Why

  • Simple to jump into, Fast because it is simple.
  • Separate tsconfig.json for client and server.
  • Client and server can share code (And types). For example: IUserDTO.d.ts
  • The client is bundled using Webpack because it goes to the browser.
  • The server is emitted by TypeScript because node 6 supports es6.


Directory Layout

.
├── /node_modules/          # 3rd-party libraries and utilities
├── /dist/                  # All the generated files will go here, and will run from this folder
├── /src/                   # The source code of the application
│   ├── /client/            # React app
│   ├── /server/            # Express server app
│   ├── /shared/            # The shared code between the client and the server
├── /assets/                # images, css, jsons etc.
├── .babelrc                # babel configuration
├── .gitignore              # ignored git files and folders
├── .nvmrc                  # Force nodejs version
├── package.json            # The list of 3rd party libraries and utilities
└── tslint.json             # TypeScript linting configuration file
├── README.md               # This file

What's included

Usage

  • npm run dev - Client and server are in watch mode with source maps, opens http://localhost:3000
  • npm run test - Runs jest tests
  • npm run build - dist folder will include all the needed files, both client (Bundle) and server.
  • npm start - Just runs node ./dist/server/server.js

What's not included

  • Universal (Server side rendering)
  • Redux/MobX (State management)

Requirements

  • Node 6+

Licence

This code is released as is, under MIT licence. Feel free to use it for free for both commercial and private projects. No warranty provided.