Skip to content

Commit

Permalink
post
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianMrn committed Dec 8, 2018
1 parent 28d3c9a commit 76682e0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ app.use(cors());

app.use(express.static(path.join(__dirname, 'react/build')));

app.get('*', (req,res) =>{
res.sendFile(path.join(__dirname+'/react/build/index.html'));
});

app.get('/left', function (req, res) {
app.post('/left', function (req, res) {

const response = left();
console.log(response);
res.send(response);
});

app.get('/right', function (req, res) {
app.post('/right', function (req, res) {

const response = right();
console.log(response);
res.send(response);
});

app.get('/shoot-that-mofo', function (req, res) {
app.post('/shoot-that-mofo', function (req, res) {

console.log(shoot());
res.send('OK');
});

/* app.get('*', (req,res) =>{
res.sendFile(path.join(__dirname+'/react/build/index.html'));
}); */

app.listen(3000);
console.log('listening on port 3000');

0 comments on commit 76682e0

Please sign in to comment.