This is just an example on how to use TypeScript for an simple Express app with passport
-
First run install npm packages
npm install
-
Install @angular/cli global
npm install -g @angular/cli
-
Create a new file named
.startupWithSecrets.ts
in the project root folderContent have to be like this (remember to replace the mongo URL):
process.env.MONGO_URL = "mongodb://localhost/typescript-db"; require("./src/server/startup");
-
Now just run the nodemon script with start command
npm start