parent
d28cb5a9ed
commit
f47a31d6d5
19 changed files with 229 additions and 149 deletions
@ -0,0 +1 @@ |
|||||||
|
alias vim='vi' |
@ -0,0 +1 @@ |
|||||||
|
set nocompatible |
@ -0,0 +1,3 @@ |
|||||||
|
{ |
||||||
|
"CurrentProjectSetting": null |
||||||
|
} |
@ -0,0 +1,6 @@ |
|||||||
|
{ |
||||||
|
"ExpandedNodes": [ |
||||||
|
"" |
||||||
|
], |
||||||
|
"PreviewInSolutionExplorer": false |
||||||
|
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@ |
|||||||
|
const config = { |
||||||
|
PORT: 5000,
|
||||||
|
DATABASE_URL: , |
||||||
|
} |
||||||
|
|
||||||
|
export default config; |
@ -0,0 +1,18 @@ |
|||||||
|
export const EApplicationEnvironment = Object.freeze({ |
||||||
|
DEVELOPMENT: 'development', |
||||||
|
PRODUCTION: 'production', |
||||||
|
}) |
||||||
|
|
||||||
|
export const task = Object.freeze({ |
||||||
|
PRIORITY:{ |
||||||
|
HIGH: "High", |
||||||
|
MEDIUM: "Medium", |
||||||
|
LOW: "Low", |
||||||
|
}, |
||||||
|
|
||||||
|
STATUS:{ |
||||||
|
TODO: "To do", |
||||||
|
IN_PROGRESS: "In progress", |
||||||
|
DONE: "Done!", |
||||||
|
} |
||||||
|
}) |
@ -0,0 +1,14 @@ |
|||||||
|
import { response } from "express"; |
||||||
|
import { task } from "../constants/application"; |
||||||
|
import database_service from "../services/database_service"; |
||||||
|
|
||||||
|
export default{ |
||||||
|
self:(req,res)=>{ |
||||||
|
try{ |
||||||
|
return res.status(200).json({success: true, message: "Successfully done!"}) |
||||||
|
|
||||||
|
} catch(e) { |
||||||
|
return res.status(500).json({success: false, message: "Not successfully done!"}) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
import express from 'express'; |
||||||
|
import cors from 'cors'; |
||||||
|
import config from './config/config.js'; |
||||||
|
import database_service from './services/database_service.js'; |
||||||
|
import router from './router/router.js'; |
||||||
|
|
||||||
|
const App = express();
|
||||||
|
App.use(express.json()); |
||||||
|
App.use(cors()); |
||||||
|
|
||||||
|
const onListening = () => { |
||||||
|
console.log(`Server is listening on port ${config.PORT}`); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
database_service.connect() |
||||||
|
.then( () => { |
||||||
|
App.listen(config.PORT, onListening); |
||||||
|
}).catch( (e) => { |
||||||
|
console.log(`The error is ${e}`); |
||||||
|
}) |
||||||
|
|
||||||
|
App.use("/api/variant1", router); |
@ -1,17 +1,17 @@ |
|||||||
@ECHO off |
@ECHO off |
||||||
GOTO start |
GOTO start |
||||||
:find_dp0 |
:find_dp0 |
||||||
SET dp0=%~dp0 |
SET dp0=%~dp0 |
||||||
EXIT /b |
EXIT /b |
||||||
:start |
:start |
||||||
SETLOCAL |
SETLOCAL |
||||||
CALL :find_dp0 |
CALL :find_dp0 |
||||||
|
|
||||||
IF EXIST "%dp0%\node.exe" ( |
IF EXIST "%dp0%\node.exe" ( |
||||||
SET "_prog=%dp0%\node.exe" |
SET "_prog=%dp0%\node.exe" |
||||||
) ELSE ( |
) ELSE ( |
||||||
SET "_prog=node" |
SET "_prog=node" |
||||||
SET PATHEXT=%PATHEXT:;.JS;=;% |
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||||
) |
) |
||||||
|
|
||||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* |
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* |
||||||
|
@ -1,15 +1,15 @@ |
|||||||
# Installation |
# Installation |
||||||
> `npm install --save @types/webidl-conversions` |
> `npm install --save @types/webidl-conversions` |
||||||
|
|
||||||
# Summary |
# Summary |
||||||
This package contains type definitions for webidl-conversions (https://github.com/jsdom/webidl-conversions#readme). |
This package contains type definitions for webidl-conversions (https://github.com/jsdom/webidl-conversions#readme). |
||||||
|
|
||||||
# Details |
# Details |
||||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webidl-conversions. |
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webidl-conversions. |
||||||
|
|
||||||
### Additional Details |
### Additional Details |
||||||
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT |
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT |
||||||
* Dependencies: none |
* Dependencies: none |
||||||
|
|
||||||
# Credits |
# Credits |
||||||
These definitions were written by [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender). |
These definitions were written by [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender). |
||||||
|
@ -1,15 +1,15 @@ |
|||||||
# Installation |
# Installation |
||||||
> `npm install --save @types/whatwg-url` |
> `npm install --save @types/whatwg-url` |
||||||
|
|
||||||
# Summary |
# Summary |
||||||
This package contains type definitions for whatwg-url (https://github.com/jsdom/whatwg-url#readme). |
This package contains type definitions for whatwg-url (https://github.com/jsdom/whatwg-url#readme). |
||||||
|
|
||||||
# Details |
# Details |
||||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-url. |
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-url. |
||||||
|
|
||||||
### Additional Details |
### Additional Details |
||||||
* Last updated: Sat, 18 May 2024 21:06:54 GMT |
* Last updated: Sat, 18 May 2024 21:06:54 GMT |
||||||
* Dependencies: [@types/webidl-conversions](https://npmjs.com/package/@types/webidl-conversions) |
* Dependencies: [@types/webidl-conversions](https://npmjs.com/package/@types/webidl-conversions) |
||||||
|
|
||||||
# Credits |
# Credits |
||||||
These definitions were written by [Alexander Marks](https://github.com/aomarks), [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender). |
These definitions were written by [Alexander Marks](https://github.com/aomarks), [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender). |
||||||
|
@ -0,0 +1,8 @@ |
|||||||
|
import mongoose from "mongoose"; |
||||||
|
import config from "../config/config"; |
||||||
|
|
||||||
|
export default{ |
||||||
|
connect:async() => { |
||||||
|
|
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue