mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
17 lines
403 B
TypeScript
17 lines
403 B
TypeScript
|
|
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; |