{"size": 751, "ext": "js", "max_stars_repo_path": "src/server.js", "max_stars_repo_name": "bushraAD98/bearer-auth", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/server.js", "max_issues_repo_name": "bushraAD98/bearer-auth", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/server.js", "max_forks_repo_name": "bushraAD98/bearer-auth", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.4651162791, "max_line_length": 49, "alphanum_fraction": 0.620505992}
'use strict';

const express = require('express');
const app = express();
const signup = require('./routes/signup');
const err404 = require('./error-handler/404.js');
const err500 = require("./error-handler/500");
const signin = require('./routes/signin')
const user = require('./routes/bearer.js');
const v1 = require('./routes/v1');
const v2 = require('./routes/v2');
app.use(express.json());

app.use(signup);
app.use(signin);
app.use(user);
app.use('/api/v1',v1);
app.use('/api/v2',v2);
app.get('/',(req,res)=>{
    res.send('home route');
})



app.use(err500);
app.use('*',err404);


function start(PORT){
    app.listen( PORT,()=>{
console.log(`listen to port ${PORT}`);
    })
}


module.exports = {
    app : app ,
    start : start
    }



