|
1 | | -===== TypeScript Sample: Image Board ===== |
2 | | - |
3 | | -=== Overview === |
4 | | - |
5 | | -This sample implements a complete Node.js application. |
6 | | -Notable features: |
7 | | -- Typed usage of express for server side MVC |
8 | | -- Typed usage of mongodb for server side database |
9 | | -- Typed usage of Node.js |
10 | | -- Use of TypeScript module syntax |
11 | | -- Visual Studio project file for working with the project |
12 | | - |
13 | | -=== Running === |
14 | | - |
15 | | -Note: Perform steps 3 - 6 with your working directory set to the folder containing this README: |
16 | | - |
17 | | -1. Install MongoDB if necessary (see http://docs.mongodb.org/manual/installation/ ) |
18 | | - |
19 | | -2. Run the following command to launch the MongoDB process: |
20 | | - |
21 | | -<mongoinstalldir>\bin\mongod |
22 | | - |
23 | | -3. Restore the sample app data to MongoDB in another command prompt with the following command: |
24 | | - |
25 | | -<mongoinstalldir>\bin\mongorestore dump |
26 | | - |
27 | | -4. Install the app's node dependencies with the following command: |
28 | | - |
29 | | -npm install |
30 | | - |
31 | | -5. Compile the app with the following command: |
32 | | - |
33 | | -tsc --sourcemap --module commonjs app.ts |
34 | | - |
35 | | -6. Launch the Node process to serve the app using the following command: |
36 | | - |
37 | | -node app.js |
38 | | - |
39 | | -7. Open your favorite browser and going to the following URL to access the app: |
40 | | - |
41 | | -http://localhost:3000/ |
| 1 | +# TypeScript Sample: Image Board |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This sample implements a complete Node.js application. |
| 6 | +Notable features: |
| 7 | +- Typed usage of express for server side MVC |
| 8 | +- Typed usage of mongodb for server side database |
| 9 | +- Typed usage of Node.js |
| 10 | +- Use of TypeScript module syntax |
| 11 | +- Visual Studio project file for working with the project |
| 12 | + |
| 13 | +## Running |
| 14 | + |
| 15 | +Note: Perform steps 3 - 6 with your working directory set to the folder containing this README: |
| 16 | + |
| 17 | +1. Install MongoDB if necessary (see http://docs.mongodb.org/manual/installation/ ) |
| 18 | + |
| 19 | +2. Run the following command to launch the MongoDB process: |
| 20 | +`<mongoinstalldir>\bin\mongod` |
| 21 | + |
| 22 | +3. Restore the sample app data to MongoDB in another command prompt with the following command: |
| 23 | +`<mongoinstalldir>\bin\mongorestore dump` |
| 24 | + |
| 25 | +4. Install the app's node dependencies with the following command: |
| 26 | +`npm install` |
| 27 | + |
| 28 | +5. Compile the app with the following command: |
| 29 | +`tsc --sourcemap --module commonjs app.ts` |
| 30 | + |
| 31 | +6. Launch the Node process to serve the app using the following command: |
| 32 | +`node app.js` |
| 33 | + |
| 34 | +7. Open your favorite browser and going to the following URL to access the app: |
| 35 | +`http://localhost:3000/` |
0 commit comments