WorryFree Computers   »   [go: up one dir, main page]

Skip to content

philnash/four-steps-from-javascript-to-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4 Steps from JavaScript to TypeScript

This repo shows you the steps to go through to update a project from JavaScript to TypeScript.

It was based on the advice from Dominik Kundel's blog post on moving to TypeScript at your own pace.

Running the application

First clone or download the repo and change into the directory.

git clone https://github.com/philnash/four-steps-from-javascript-to-typescript.git
cd four-steps-from-javascript-to-typescript

Install the dependencies:

npm install

Run the application.

npm start

You can now visit http://localhost:3000 and see a static HTML page or make a POST request to http://localhost:3000/webhooks/messages and get a dad joke in TwiML format for responding to incoming SMS messages to a Twilio number.

curl --data "" http://localhost:3000/webhooks/messages
<?xml version="1.0" encoding="UTF-8"?><Response><Message>It was raining cats and dogs the other day. I almost stepped in a poodle.</Message></Response>

Moving to TypeScript

You can follow the directions in the blog post to move this repo to TypeScript. There are also branches that show the changes at each stage.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published