This has multiple mis-matches and one plain error. I'll list them in order of appearance:
Mismatch of import app from '../src/app'; with naming the file index.ts.
Error: import * as express from 'express'; should be import express from 'express'; otherwise you create a naming conflict (and no express.express() doesn't work).
Mismatch of import {Todo} from "./models"; with naming the file Todo.ts.
Mismatch of import {Todo} from "./models"; with export default Todo;.
:Ü™
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This has multiple mis-matches and one plain error. I'll list them in order of appearance:
import app from '../src/app';
with naming the fileindex.ts
.import * as express from 'express';
should beimport express from 'express';
otherwise you create a naming conflict (and noexpress.express()
doesn't work).import {Todo} from "./models";
with naming the fileTodo.ts
.import {Todo} from "./models";
withexport default Todo;
.:Ü™