I am currently utilizing express
as my server for a straightforward project structured as follows:
.
├── src
│ └── index.html
│ └── index.ts
│ └── three.js
├── main.ts
├── package.json
└── tsconfig.json
The contents of main.js
are as below:
import * as express from 'express'
const app = express()
app.use(express.static('src'))
app.listen(80)
In addition, the index.html
file consists of only a <title>
tag in the <head>
section and an empty <body>
tag followed by two <script>
tags:
<script src='three.js'></script>
<script src='index.js'></script>
The three.js
is a library that I aim to use with TypeScript typings. However, I am unsure how to configure my tsconfig.json
file in order to successfully run:
$ tsc --project tsconfig.json && node main.js
and achieve the desired outcome. One question that arises is how to include the typings for three.js
into my index.ts
file?