microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.
MIT License
11.3k stars 2.76k forks source link

Added VSCode Dev Containers #303

Closed diberry closed 9 months ago

diberry commented 3 years ago

1) added explanation to readme 2) added .devcontainer dir configured for this project 3) edited the Mongo code in app.ts so it will work with CosmosDB

peterblazejewicz commented 3 years ago

@diberry So I've tested this on 2 different configurations and it worked. The only change I'd recomend is to outline the need to modify default Mongo connection url in order to make this working. It works flawlessly when using named host:

# This is standard running mongodb locally
MONGODB_URI_LOCAL=mongodb://mongo:27017/testdb

(in .env created as per README). I've tested this on 2 machines with Win10, WSL2.

peterblazejewicz commented 2 years ago

@diberry can you reiview this PR? I've rebased it on current master, so it's up with the rest of the code