Created
April 16, 2020 02:47
-
-
Save navsing/50895c4278c0ddb55e9dbfbdc52a62dd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const express = require('express') | |
const app = express() | |
var path = require('path') | |
var bodyParser = require('body-parser') | |
app.use(express.static(path.join(__dirname, 'build'))); | |
var dataController = require('./dataController'); | |
app.get('/api/data', dataController.getData); | |
const port = 3002; | |
app.listen(process.env.PORT || port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment