GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - melroy89/fastify-node-ts-swc-demo: TypeScript + Fastify + ES modules + Node-TS demo repo

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.cjs
.eslintrc.cjs
 
 
.gitignore
.gitignore
 
 
.prettierrc
.prettierrc
 
 
.swcrc
.swcrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
nodemon.json
nodemon.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

TypeScript + Fastify ESM + Node-TS Demo

Working TypeScript + SWC + Fastify + ES Modules + Node-TS demo. See workaround below.

First install deps via: npm install

Try to excute: npm run dev (this will use Node-TS + SWC)

Or run: npm start

Finally, go to: http://localhost:3000

A fast build using SWC, run: npm run build. If you want to use TSC compiler use: npm run build:prod, which does validate types.


WORKAROUND: We currently apply a workaround by setting VITEST=true to force ESM in Fastify-autoloader. So npm run dev is using:

FASTIFY_AUTOLOAD_TYPESCRIPT=1 VITEST=true node --no-warnings=ExperimentalWarning --loader ts-node/esm src/index.ts

About

TypeScript + Fastify + ES modules + Node-TS demo repo

Topics

es6es6-modulesesmesmodulesfastifyfastify-autoloadnode-tsnodejsswctypescript

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.