Skip to content

deviatorslegacy/nodejs-typescript-template

Repository files navigation

Typescript Node.js Template

Description

This is a project template for making full-stack Typescript apps.

This doesn't make use any complicated build tools or web frameworks, but does use Typescript, Express.js, Embedded Javascript, Socket.io, and Sass, which is what I use for my personal projects.

NPM Scripts

Call these with npm run [command]

  • build: run all build commands in parallel, with run-p (from npm-run-all)
  • build-server: tsc builds server-side code, using --watch flag.
  • build-client: tsc builds client-side code, using --watch flag.
  • build-sass: sass builds stylesheets, using --watch flag.

Directory Structure

Source code is organized like this:

src (from root project directory)
├── src/client # Client-side typescript
│   └── main.ts
├── src/server # Server-side typescript
│   └── server.ts
└── src/styles # CSS/SCSS/Sass styles
    └── main.css

From here, it is compiled to the public/dist directory:

dist (from root project directory)
└── server.js # Output server-side javascript here

public/dist (from root project directory)
├── css # Output css here (also outputs map files by default)
│   ├── main.css
│   └── main.css.map
└── js # Output client-side javascript here
    └── main.js

DeviatorsLegacy, 2021

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published