+ hudozka-data package; /api/v1/feed -> /api/v1/timeline; other updates
This commit is contained in:
1 parent
d0878ec296
commit
b96d66591f
14 files changed
+84
-59
No files matched your search
+16
-8
@@ -1,21 +1,29 @@
|
||||
import 'babel-polyfill';
|
||||
|
||||
import config from './config';
|
||||
import {connect} from './core/db';
|
||||
import {connect, collection} from './core/db';
|
||||
import io from './io';
|
||||
import server from './server';
|
||||
|
||||
import DataManager from 'hudozka-data';
|
||||
// var DataManager = require('hudozka-data').default;
|
||||
|
||||
function main() {
|
||||
async function loop(){
|
||||
async function loop() {
|
||||
await connect(config.db.uri);
|
||||
|
||||
try{
|
||||
var server = require('./server').default;
|
||||
var io = require('./io').default;
|
||||
try {
|
||||
let data = new DataManager({
|
||||
timeline: collection('timeline')
|
||||
});
|
||||
|
||||
let app = server(data);
|
||||
io(app, data);
|
||||
|
||||
var app = server();
|
||||
io(app);
|
||||
app.listen(config.port);
|
||||
}catch(e){
|
||||
} catch (e) {
|
||||
console.error(e.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Start listening ${config.port}`);
|
||||
|
||||
Reference in new issue
Block a user