Git Product home page Git Product logo

learn-typescript's Introduction

Typescript Project Demo

Heavily WIP (may be missing some documentation/steps)

This repo is a step by step implementation of a Typescript project and the various benefits therein.

This tutorial aims for a low barrier to entry; it may be quite verbose, the goal is that anyone of any level can learn something from this demo.

A rough project map would include:

  • Project Setup
    • Git
      • .gitignore
    • Node
      • package.json
    • Environment Vars
    • Typescript
      • tsconfig
      • tslint
      • ts-node
      • ts-jest
    • Nodemon
    • Testing Framework Configuration using Jest
    • Build Configuration using Webpack
  • OOP
    • Interfaces
    • Classes
    • Generics
    • Decorators
  • Front End Framework
    • Select one!
      • Vue
        • Using Vue CLI 3
        • pug Templates
        • TypeScript
        • SCSS
        • Vuex
        • Vue Router
        • Kickass Modern Vue Decorator Libraries
      • React ? another day...
    • Redux/Vuex State management
    • Vue-Router/React-Router SPA Routing
  • Back End Framework
    • NestJS
      • GraphQL
        • Query
        • Mutation
        • Subscription (Yet todo...)
  • Tests
    • Mocking
  • Docker
    • Setup
      • dockerfile
      • docker-compose.yaml
    • Usage
      • make
      • docker-compose
    • Database
      • Cassandra (NoSQL)
      • Postgres/MySQL (SQL)
    • Node Microservice
      • NestJS
      • GraphQL
  • Front End Testing
  • E2E Testing
  • Deployment (tbd)

Doc Links

Setup the Server

We'll be using NestJS for its amazing CLI, advanced features (GraphQL, etc.), and TypeScript support.

The project has been broken into two distinct codebases to prevent polluting backend/frontend application code:

  • The front end application (vue-app), implementing a vue front end with the Vue CLI 3 proxying to the NestJS back end
  • The back end application (typescript-api-app), built using NestJS and GraphQL

Frontend Vue Application: vue-app

Within the vue-app/ resides the frontend application which handles the VueJS Application. In development mode it proxies the backend server requests thus allowing the development environment to interact with the back end application and GraphQL.

Running Vue-App

To start the live-reload development environment use:

yarn serve

To build the front end application for production use:

yarn build

Testing Vue-App

todo

Backend NestJS/GraphQL Application: typescript-api-app

Within the typescript-api-app/ resides the backend application which handles all the API requests, and ultimately serving pages.

Running Typescript-Api-App

To start the live-reload development environment use:

yarn start:dev

To start the production server use:

yarn start:prod

Testing Typescript-Api-App

To start the unit tests use:

yarn test

To engage watch mode, and live-restart the tests:

yarn test:watch

To start the E2E tests use:

yarn test:e2e

To engage watch mode, and live-restart the tests:

yarn test:e2e:watch

To run a coverage test use:

yarn test:cov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.