mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
18 lines
441 B
TypeScript
18 lines
441 B
TypeScript
/// <reference path="rest-io.d.ts" />
|
|
|
|
import express = require('express');
|
|
import restIO = require('rest-io');
|
|
import mongoose = require('mongoose');
|
|
|
|
var app = express();
|
|
|
|
// register the express app with rest.io
|
|
restIO.restIO(app, {
|
|
resources: __dirname + '/resources'
|
|
});
|
|
|
|
mongoose.connect('mongodb://localhost:27017/test');
|
|
app.listen(3000, function () {
|
|
console.log('Server has started under port: 3000');
|
|
});
|
|
module.exports = app; |