-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Added test): Added test environment
- testing environment added using mocha & chai [Delivers #164489920]
- Loading branch information
Copain Fabrice BIENAIME
authored and
Copain Fabrice BIENAIME
committed
Mar 22, 2019
1 parent
fd93d71
commit d0f66b0
Showing
6 changed files
with
1,395 additions
and
576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"/Users/copainfabricebienaime/Desktop/Andela/node/bad_ass-ah-backend/index.js":{"path":"/Users/copainfabricebienaime/Desktop/Andela/node/bad_ass-ah-backend/index.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":3}},"1":{"start":{"line":7,"column":15},"end":{"line":7,"column":33}},"2":{"start":{"line":9,"column":16},"end":{"line":9,"column":48}},"3":{"start":{"line":11,"column":39},"end":{"line":11,"column":93}},"4":{"start":{"line":13,"column":12},"end":{"line":13,"column":36}},"5":{"start":{"line":14,"column":13},"end":{"line":14,"column":37}},"6":{"start":{"line":15,"column":0},"end":{"line":15,"column":22}},"7":{"start":{"line":16,"column":0},"end":{"line":21,"column":3}},"8":{"start":{"line":17,"column":2},"end":{"line":20,"column":5}},"9":{"start":{"line":23,"column":0},"end":{"line":25,"column":3}},"10":{"start":{"line":24,"column":2},"end":{"line":24,"column":56}},"11":{"start":{"line":27,"column":0},"end":{"line":27,"column":22}}},"fnMap":{"0":{"name":"_interopRequireDefault","decl":{"start":{"line":11,"column":9},"end":{"line":11,"column":31}},"loc":{"start":{"line":11,"column":37},"end":{"line":11,"column":95}},"line":11},"1":{"name":"(anonymous_1)","decl":{"start":{"line":16,"column":8},"end":{"line":16,"column":9}},"loc":{"start":{"line":16,"column":22},"end":{"line":21,"column":1}},"line":16},"2":{"name":"(anonymous_2)","decl":{"start":{"line":23,"column":17},"end":{"line":23,"column":18}},"loc":{"start":{"line":23,"column":23},"end":{"line":25,"column":1}},"line":23}},"branchMap":{"0":{"loc":{"start":{"line":11,"column":46},"end":{"line":11,"column":92}},"type":"cond-expr","locations":[{"start":{"line":11,"column":70},"end":{"line":11,"column":73}},{"start":{"line":11,"column":76},"end":{"line":11,"column":92}}],"line":11},"1":{"loc":{"start":{"line":11,"column":46},"end":{"line":11,"column":67}},"type":"binary-expr","locations":[{"start":{"line":11,"column":46},"end":{"line":11,"column":49}},{"start":{"line":11,"column":53},"end":{"line":11,"column":67}}],"line":11},"2":{"loc":{"start":{"line":14,"column":13},"end":{"line":14,"column":37}},"type":"binary-expr","locations":[{"start":{"line":14,"column":13},"end":{"line":14,"column":29}},{"start":{"line":14,"column":33},"end":{"line":14,"column":37}}],"line":14}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1},"f":{"0":1,"1":1,"2":1},"b":{"0":[0,1],"1":[1,1],"2":[1,1]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"43573b972e9f1828759295dff4079fb952c39e40","contentHash":"0bf37bb975e513d72d5d155394fb86488a430d95bb5248f98e1b9cf81a653cb1"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.