Skip to content

victoriacheng15/ts-node-demo

Repository files navigation

TS node demo

screenshot of the side

View the live Site here

NOTE: I am on the free plan of render, the app will go sleep after 15 minutes of being inactive, so the start up may be slow.

This is a demo app that I am getting familiar with the process of how to run the node app with TypeScript and then deploy on render.

** folder structure**

|-- public
  |-- style.css
|-- src
  |-- controllers
    |-- timeController.ts
  |-- routes
    |-- timeRoutes.ts
  |-- index.ts
|-- views`
  |-- index.html

Tech Stack

TypeScript node Express

Installation

git clone git@github.com:victoriacheng15/ts-node-demo.git
cd ts-node-demo
# If you are using `npm` or `yarn`
rm -rf pnpm-lock.yaml

npm/yarn install

# If you use pnpm
pnpm install

What I have learned

I learned that there are a couple of ways to run the TS node app.

  • concurrently
  • nodemon
  • ts-node-dev

Overall, I like the concurrently method since it installs fewer packages and one less config file e.g. nodemon.json.

Source

The app idea was borrowed from freeCodeCamp - Back End Development and APIs.

About

This is a demo project on how to deply TypeScript node. **NOTE: on the free plan of render, and it starts up slowly, please be patience**

Topics

Resources

Stars

Watchers

Forks