Skip to content

Instantly share code, notes, and snippets.

@divanvisagie
Last active January 2, 2019 08:58
Show Gist options
  • Save divanvisagie/f2c6e805db81aa730e134c5728dd6b87 to your computer and use it in GitHub Desktop.
Save divanvisagie/f2c6e805db81aa730e134c5728dd6b87 to your computer and use it in GitHub Desktop.
Express TypeScript example
import express, {Express} from 'express'
const port: number = 3000
const app: Express = express()
app.get('/', (req, res) => {
res.json({message: 'Hello World'})
})
app.listen(port, () => {
console.log(`Express is listening on port ${port}`)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment