Skip to content

Commit

Permalink
Merge b94b5c1 into 8a4f462
Browse files Browse the repository at this point in the history
  • Loading branch information
cop1fab committed Mar 22, 2019
2 parents 8a4f462 + b94b5c1 commit 2db9cb1
Show file tree
Hide file tree
Showing 5 changed files with 1,398 additions and 576 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ node_modules
#package-lock
package-lock.json

#nyc
.nyc_output




Expand Down
20 changes: 13 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import http from 'http';
import app from './routes/index';
import express from 'express';

const app = express();
const port = process.env.PORT || 3000;
app.set('port', port);
app.use((req, res) => {
res.status(404).send({
status: 404,
error: 'resource not found',
});
});

app.set('poort', port);

const server = http.createServer(app);
app.listen(port, () => {
console.log(`Server started successfully on ${port}`);
});

server.listen(port, () =>{
console.log(`Server started successfully on ${port}`);
})
export default app;
Loading

0 comments on commit 2db9cb1

Please sign in to comment.