server.js 447 Bytes
Newer Older
Test User's avatar
test    
Test User committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import express from 'express'
import path from 'path'

const app = express()

// console.log(path.join('/client/build'))
// app.use(express.static(path.join('../', '/client/build')))

app.get('/', (req, res) => {
    res.send('Hello')
})


app.get('/home', (req, res) => {
    res.send('Home page')
})

app.put('/signin', (req, res) => {
    res.send('Sign in')
})


app.listen(3001, () => {
    console.log('Server is listensing on port 3001')
})