Switch from express app to router in API
Co-Authored-By: Tom Russell <tomalrussell@gmail.com>
This commit is contained in:
parent
8b78a74874
commit
b5b72e7152
@ -7,7 +7,7 @@ import { queryLocation } from './services/search';
|
||||
import buildingsRouter from './routes/buildingsRouter';
|
||||
|
||||
|
||||
const server = express();
|
||||
const server = express.Router()
|
||||
|
||||
// parse POSTed json body
|
||||
server.use(bodyParser.json());
|
||||
@ -138,4 +138,4 @@ server.use((req, res) => {
|
||||
res.status(404).json({ error: 'Resource not found'});
|
||||
})
|
||||
|
||||
export default server;
|
||||
export default server;
|
||||
|
Loading…
Reference in New Issue
Block a user