diff --git a/todo/.bash_aliases b/todo/.bash_aliases new file mode 100644 index 0000000..fc3c417 --- /dev/null +++ b/todo/.bash_aliases @@ -0,0 +1 @@ +alias vim='vi' diff --git a/todo/.vimrc b/todo/.vimrc new file mode 100644 index 0000000..cd52193 --- /dev/null +++ b/todo/.vimrc @@ -0,0 +1 @@ +set nocompatible diff --git a/todo/.vs/ProjectSettings.json b/todo/.vs/ProjectSettings.json new file mode 100644 index 0000000..866f1e1 --- /dev/null +++ b/todo/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/todo/.vs/VSWorkspaceState.json b/todo/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..9568b22 --- /dev/null +++ b/todo/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/todo/.vs/slnx.sqlite b/todo/.vs/slnx.sqlite new file mode 100644 index 0000000..1fc03c7 Binary files /dev/null and b/todo/.vs/slnx.sqlite differ diff --git a/todo/.vs/todo/FileContentIndex/b1756685-8f8f-4815-a952-9a815abdf018.vsidx b/todo/.vs/todo/FileContentIndex/b1756685-8f8f-4815-a952-9a815abdf018.vsidx new file mode 100644 index 0000000..bb4f286 Binary files /dev/null and b/todo/.vs/todo/FileContentIndex/b1756685-8f8f-4815-a952-9a815abdf018.vsidx differ diff --git a/todo/.vs/todo/FileContentIndex/read.lock b/todo/.vs/todo/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/todo/.vs/todo/v17/.suo b/todo/.vs/todo/v17/.suo new file mode 100644 index 0000000..9eb8429 Binary files /dev/null and b/todo/.vs/todo/v17/.suo differ diff --git a/todo/backend/config/config.js b/todo/backend/config/config.js index e69de29..746d81c 100644 --- a/todo/backend/config/config.js +++ b/todo/backend/config/config.js @@ -0,0 +1,6 @@ +const config = { + PORT: 5000, + DATABASE_URL: , +} + +export default config; \ No newline at end of file diff --git a/todo/backend/constants/application.js b/todo/backend/constants/application.js index e69de29..7a27f7a 100644 --- a/todo/backend/constants/application.js +++ b/todo/backend/constants/application.js @@ -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!", + } +}) \ No newline at end of file diff --git a/todo/backend/controller/api_controller.js b/todo/backend/controller/api_controller.js index e69de29..88239c3 100644 --- a/todo/backend/controller/api_controller.js +++ b/todo/backend/controller/api_controller.js @@ -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!"}) + } + } +} diff --git a/todo/backend/index.js b/todo/backend/index.js index e69de29..7446804 100644 --- a/todo/backend/index.js +++ b/todo/backend/index.js @@ -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); \ No newline at end of file diff --git a/todo/backend/node_modules/.bin/mime.cmd b/todo/backend/node_modules/.bin/mime.cmd index 54491f1..a9e48f1 100644 --- a/todo/backend/node_modules/.bin/mime.cmd +++ b/todo/backend/node_modules/.bin/mime.cmd @@ -1,17 +1,17 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* diff --git a/todo/backend/node_modules/@types/webidl-conversions/README.md b/todo/backend/node_modules/@types/webidl-conversions/README.md index a0f3f9d..7cd5c9d 100644 --- a/todo/backend/node_modules/@types/webidl-conversions/README.md +++ b/todo/backend/node_modules/@types/webidl-conversions/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/webidl-conversions` - -# Summary -This package contains type definitions for webidl-conversions (https://github.com/jsdom/webidl-conversions#readme). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webidl-conversions. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 15:11:36 GMT - * Dependencies: none - -# Credits -These definitions were written by [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender). +# Installation +> `npm install --save @types/webidl-conversions` + +# Summary +This package contains type definitions for webidl-conversions (https://github.com/jsdom/webidl-conversions#readme). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webidl-conversions. + +### Additional Details + * Last updated: Tue, 07 Nov 2023 15:11:36 GMT + * Dependencies: none + +# Credits +These definitions were written by [ExE Boss](https://github.com/ExE-Boss), and [BendingBender](https://github.com/BendingBender). diff --git a/todo/backend/node_modules/@types/whatwg-url/README.md b/todo/backend/node_modules/@types/whatwg-url/README.md index 75b056c..11061eb 100644 --- a/todo/backend/node_modules/@types/whatwg-url/README.md +++ b/todo/backend/node_modules/@types/whatwg-url/README.md @@ -1,15 +1,15 @@ -# Installation -> `npm install --save @types/whatwg-url` - -# Summary -This package contains type definitions for whatwg-url (https://github.com/jsdom/whatwg-url#readme). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-url. - -### Additional Details - * Last updated: Sat, 18 May 2024 21:06:54 GMT - * Dependencies: [@types/webidl-conversions](https://npmjs.com/package/@types/webidl-conversions) - -# 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). +# Installation +> `npm install --save @types/whatwg-url` + +# Summary +This package contains type definitions for whatwg-url (https://github.com/jsdom/whatwg-url#readme). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/whatwg-url. + +### Additional Details + * Last updated: Sat, 18 May 2024 21:06:54 GMT + * Dependencies: [@types/webidl-conversions](https://npmjs.com/package/@types/webidl-conversions) + +# 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). diff --git a/todo/backend/node_modules/sift/es5m/index.js b/todo/backend/node_modules/sift/es5m/index.js index 3136cbf..afb7464 100644 --- a/todo/backend/node_modules/sift/es5m/index.js +++ b/todo/backend/node_modules/sift/es5m/index.js @@ -1,37 +1,37 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; var typeChecker = function (type) { diff --git a/todo/backend/node_modules/sift/lib/index.js b/todo/backend/node_modules/sift/lib/index.js index d0d8933..74b5289 100644 --- a/todo/backend/node_modules/sift/lib/index.js +++ b/todo/backend/node_modules/sift/lib/index.js @@ -4,40 +4,40 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sift = {})); })(this, (function (exports) { 'use strict'; - /****************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise, SuppressedError, Symbol */ - - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - - function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - - typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + /****************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise, SuppressedError, Symbol */ + + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + } + + typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; var typeChecker = function (type) { diff --git a/todo/backend/node_modules/sift/sift.csp.min.js b/todo/backend/node_modules/sift/sift.csp.min.js index 673941c..b80705d 100644 --- a/todo/backend/node_modules/sift/sift.csp.min.js +++ b/todo/backend/node_modules/sift/sift.csp.min.js @@ -4,40 +4,40 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sift = {})); })(this, (function (exports) { 'use strict'; - /****************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise, SuppressedError, Symbol */ - - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - - function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - - typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + /****************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise, SuppressedError, Symbol */ + + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + } + + typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; var typeChecker = function (type) { diff --git a/todo/backend/services/database_service.js b/todo/backend/services/database_service.js index e69de29..13e648c 100644 --- a/todo/backend/services/database_service.js +++ b/todo/backend/services/database_service.js @@ -0,0 +1,8 @@ +import mongoose from "mongoose"; +import config from "../config/config"; + +export default{ + connect:async() => { + + } +} \ No newline at end of file