{"id":21165986,"url":"https://github.com/peterdee/test-node-express","last_synced_at":"2025-03-14T16:45:33.645Z","repository":{"id":103803858,"uuid":"91073005","full_name":"peterdee/test-node-express","owner":"peterdee","description":"Test task with Node, Express \u0026 EJS","archived":false,"fork":false,"pushed_at":"2020-04-28T22:31:01.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-21T10:11:14.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterdee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-12T09:09:50.000Z","updated_at":"2020-04-28T22:30:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6f68d67-aa47-433e-a0cb-42f560b10c42","html_url":"https://github.com/peterdee/test-node-express","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Ftest-node-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Ftest-node-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Ftest-node-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterdee%2Ftest-node-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterdee","download_url":"https://codeload.github.com/peterdee/test-node-express/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243615336,"owners_count":20319726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T14:47:49.493Z","updated_at":"2025-03-14T16:45:33.625Z","avatar_url":"https://github.com/peterdee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nREADME.md for Test task.\n\n\nServer side:\n\nServer side of the application divided into several pieces.\n\nMain file is app.js, it contains all of the routes. When application is started, a check is performed to see if the user is authorized or not. If the user is authorized, his profile information is shown. To get user information, application is sending a curl request with authorization token, obtained from the login procedure. Curl request was chosen over http because it is more simple and clear. If the user is not authorized, then he can go through the authorization procedure: he will be redirected to the authorization site, where he must perform a log in using his login name and password, and then he will be redirected back to the index page of the application, and then his personal information will be automatically loaded.\n\nPassport.js contains authorization strategy for this application.\n\nClient Id and Client Secret are stored in config.js; it should be noted that _config.js, included with the application, DOES NOT contain Secret and Id, and it should be renamed into config.js and edited accordingly (i. e. you should put your Secret and Id into config.js).\n\n\nClient side:\n\nIndex.html is used to show all the information to the user.\n\nJQuery-3-1-1.js is a jQuery library, that is used for some UI enhancements and for the AJAX requests.\n\nStyle.css contains styles for the application.\n\nClient.js is a client side of the application. It has several AJAX requests, and also some logic that controls visibility of some elements. For example, client.js controls the login and logout links, making them accessible/inaccessible depending on the situation.\n\n\nInstallation:\n\nTo install the application, you can clone the repo, then in the installation directory you should perform ‘npm install’.\n\n\nRunning the app:\n\nTo run the app, you should go to the installation directory and perform ’npm start’.\n\n\nUPDATE TO VERSION 2 (05.17.2017)\n\nChanges / improvements:\n\n- added server-side rendering;\n\n- added template engine (EJS);\n\n- removed index.html;\n\n- reduced size of the client part of the app (client.js);\n\n- updated code to ES6 standarts.\n\nCurrently, app has 2 states: index and user. In index state there's a 'Log in' invite, and in user state there's user data.\nStates are changed depending on the authorization state of the user, so unauthorized user can't get user data.\nAlso, CURL request was changed to http request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdee%2Ftest-node-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterdee%2Ftest-node-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdee%2Ftest-node-express/lists"}