{"size": 689, "ext": "js", "max_stars_repo_path": "api/server.js", "max_stars_repo_name": "Build-Week-Bookr/bookr-BE", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "api/server.js", "max_issues_repo_name": "Build-Week-Bookr/bookr-BE", "max_issues_repo_issues_event_min_datetime": "2019-09-05T07:17:37.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-01T21:59:42.000Z", "max_forks_repo_path": "api/server.js", "max_forks_repo_name": "Build-Week-Bookr/bookr-BE", "max_forks_repo_forks_event_min_datetime": "2019-09-05T00:53:07.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-23T08:14:58.000Z"}
{"max_stars_count": null, "max_issues_count": 6, "max_forks_count": 2, "avg_line_length": 24.6071428571, "max_line_length": 59, "alphanum_fraction": 0.6894049347}
const express = require('express');
const cors = require('cors');
const helmet = require('helmet');

const server = express();

const authRouter = require('../auth/authRouter.js');
const usersRouter = require('../users/usersRouter.js');
const bookRouter= require('../books/book-router.js');
const reviewRouter= require('../reviews/review-router.js');


server.use(helmet());
server.use(cors());
server.use(express.json());

server.use('/api/auth', authRouter);
server.use('/api/users', usersRouter);
server.use('/api/books', bookRouter);
server.use('/api/reviews',reviewRouter);

server.get('/', (req, res) => {
  res.status(200).json("Welcome to Bookr!");
});

module.exports = server;

 