{"id":26658887,"url":"https://github.com/denisecase/node-express-mvc-ejs-start","last_synced_at":"2025-04-11T14:09:37.429Z","repository":{"id":38398856,"uuid":"220858216","full_name":"denisecase/node-express-mvc-ejs-start","owner":"denisecase","description":"Starter app using Node Express MVC EJS","archived":false,"fork":false,"pushed_at":"2025-01-17T06:35:27.000Z","size":1491,"stargazers_count":6,"open_issues_count":2,"forks_count":51,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T10:17:06.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denisecase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-11-10T22:12:48.000Z","updated_at":"2024-12-13T19:32:30.000Z","dependencies_parsed_at":"2024-05-05T15:44:04.517Z","dependency_job_id":null,"html_url":"https://github.com/denisecase/node-express-mvc-ejs-start","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/denisecase%2Fnode-express-mvc-ejs-start","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fnode-express-mvc-ejs-start/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fnode-express-mvc-ejs-start/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fnode-express-mvc-ejs-start/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisecase","download_url":"https://codeload.github.com/denisecase/node-express-mvc-ejs-start/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248413711,"owners_count":21099347,"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":"2025-03-25T10:17:10.843Z","updated_at":"2025-04-11T14:09:37.408Z","avatar_url":"https://github.com/denisecase.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-express-mvc-ejs-start Starter app\n\n[![Build Status](https://travis-ci.org/denisecase/node-express-mvc-ejs-start.svg?branch=master)](https://travis-ci.org/denisecase/node-express-mvc-ejs-start)\n\n## Links\n\n- [Demo on Heroku](https://node-express-mvc-ejs-start-h.herokuapp.com/)\n- [Demo on Google Cloud](https://node-express-mvc-ejs-start.appspot.com)\n- [Source](https://github.com/denisecase/node-express-mvc-ejs-start)\n\n## About\n\nUse this starter app to initialize a full-stack app using:\n\n- Node.js platform\n- Express web framework\n- EJS templating engine (adding Pug)\n- MVC design pattern\n- Mongoose MongoDB object modeling\n- Lodash for JavaScript object iteration and manipulation\n- jQuery library for DOM manipulation\n- BootStrap Material Design framework for responsive design\n- Morgan HTTP request logger\n- Winston multi-level logger that transports to log files\n- SQLite database\n- \u003chttps://sqlitestudio.pl/\u003e\n- Cypress.io testing \n\n```PowerShell\nchoco install sqlite -y\nchoco install sqlitestudio -y\nrefresh env\nnpm install sqlite3\n\nnpm install cypress --save-dev\nnpx cypress open\nnpm run cypress\n```\n\nMy SQLitebrowser did not not start, so I switched to SQLite Studio. \n\nTo start SQLite Studio, hit Windows start key, type SQLite Studio and run as administrator.  \n\n## Prerequisites\n\nFollowing must be downloaded, installed, and configured according to the product directions:\n\n- Node.js (comes with npm)\n- Git version control system\n- VS Code light-weight, cross-platform code editor or other IDE\n\n## Recommended\n\n- If Windows, TortoiseGit\n- Add \"Open PowerShell Here as Administrator\" to context menu. Download and run file from \u003chttps://github.com/profcase/open-command-window-here-as-admin\u003e.\n\n## Start a new MVC full-stack project\n\n1. Fork this repo into your own cloud account.\n2. Clone your repo down to your local machine.\n3. Copy .env.example to .env\n4. Update .env with your information.\n5. Open PowerShell in root folder and run `npm install` to install dependencies.\n6. Run `node app.js` to start the server.\n7. Open browser to the location displayed, e.g. \u003chttp://localhost:3004/\u003e.\n\n## Production Environment\n\n1. Run MongoDB in the cloud - see \u003chttps://www.mongodb.com/cloud/atlas\u003e\n\n## Review Code Organization\n\n- app.js - Starting point for the application. Defines the express server, requires routes and models. Loads everything and begins listening for events.\n- controllers/ - logic for handling client requests\n- data/ - seed data loaded each time the application starts\n- models/ - schema descriptions for custom data types\n- routes/ - route definitions for the API\n- utils/ - utilities\n- views/ - EJS - embedded JavaScript and HTML used to create dynamic pages\n\n## Resources\n\n- [Bootstrap Material Design CDN](https://mdbootstrap.com/md-bootstrap-cdn/)\n- [JavaScript Standard Style Validator](https://standardjs.com/demo.html)\n- [ESLint](https://eslint.org/)\n- [TravisCI](https://travis-ci.org/)\n- [Data Hosting with Atlas](https://www.mongodb.com/cloud/atlas)\n\n## Choose from 2 deployment options\n\n- [App Hosting with Heroku](https://www.heroku.com/)\n\nOR\n\n- [App Hosting with Google Cloud Platform](https://cloud.google.com/gcp)\n- [GCP Eduction Credits for Faculty](https://edu.google.com/programs/faculty/?modal_active=none)\n\n## Set up Heroku\n\n1. Signup for Heroku account.\n1. Install Heroku CLI.\n1. Create a new app with a unique name (this will appear in your app URI).\n1. Go to App / Settings / Config Vars and add an ATLAS_URI key with the value from your .env.\n1. Go to App / Settings / Heroku Git URL and copy the URL to clipboard to paste in following command.\n1. Create a git alias named heroku that points to this URL. Either use TortoiseGit / Settings / Remote to create heroku and set it to the URL - or open PowerShell as Admin in your root project folder and use just your Heroku app name in the command below:\n\n```PowerShell\nheroku login\nheroku git:remote -a yourHerokuAppName\n```\n\n## Deploy with Heroku\n\nAfter making changes, open PowerShell as Admin in your root project folder:\n\n```PowerShell\nheroku login\ngit push heroku master\n```\n\n## Deploy with Google Cloud Platform\n\n1. Choose a person to host your application code.\n1. Hoster should click on their Student Coupon Retrieval Link.\n1. Follow instructions to get an account.\n1. Install GCloud SDK\n1. Enable Cloud Build API and billing.\n1. Use the commands below to create a project - use your repo name.\n1. Then initialize an App Engine Application in the project - it will ask for a region. Choose one nearby with free option.\n1. package.json needs new dependency: @google-cloud/logging-winston\n1. package.json needs to set the node entry value to \"^10\"\n1. See app.yaml for suggested settings.\n1. After the app deploy command, you will get an error. Read the error and go to the URL provided to enable billing.\n\n```PowerShell\ngcloud projects create node-express-mvc-ejs-start --set-as-default\ngcloud projects describe node-express-mvc-ejs-start\ngcloud app create --project=node-express-mvc-ejs-start\ngcloud app deploy\ngcloud app browse\n```\n\nWhen starting a new session, you'll have to log in again and then set the project.\n\n```PowerShell\ngcloud config set project node-express-mvc-ejs-start\n```\n\nYou should get some results that include something like the following.\n\n```PowerShell\ndescriptor:      C:\\44563\\node-express-mvc-ejs-start\\app.yaml\nsource:          C:\\44563\\node-express-mvc-ejs-start\ntarget project:  node-express-mvc-ejs-start\ntarget url:      \u003chttps://node-express-mvc-ejs-start.appspot.com\u003e\n```\n\n## See Also\n\n- [More App Examples](https://profcase.github.io/web-apps-list/)\n- [Add Cypress](https://www.freecodecamp.org/news/how-to-add-end-to-end-tests-to-your-project-with-cypress-a74437f6df6e/)\n- [SQLite CRUD](https://blog.pagesd.info/2019/10/08/crud-with-express-sqlite-10-steps/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fnode-express-mvc-ejs-start","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisecase%2Fnode-express-mvc-ejs-start","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fnode-express-mvc-ejs-start/lists"}