This repo is for the @georgiancollege/express-mvc npm module
This package uses a MVC (Model-View-Controller) design pattern for the site structure.
It was designed for students at Georgian College (https://www.georgiancollege.ca/) but is publicly available.
npm i @georgiancollege/express-mvc -g
> express-mvc <options> [folder]
where options is installation options and folder is the installation folder.
if installation folder is not specified, then the express mvc site structure is scaffolded in the current folder.
--api - scaffold an Express api that does not include views
--auth - adds authentication
--tsc - provide TypeScript support
--hbs - uses handlebars view engine
the default is a JavaScript MVC with no Authentication
> npm install
.ts
files to .js
as Node and Express require JavaScript:> npm run build
express-mvc-js
Client
Assets
images
.gitkeep
Content
app.css
Scripts
app.js
Server
Config
app.js
Controllers
index.js
Models
user.js
Routes
index.js
Views
error.ejs
index.ejs
.env
.gitignore
package.json
server.js
require
statements)express-mvc-js-hbs
Client
Assets
images
.gitkeep
Content
app.css
Scripts
app.js
Server
Config
app.js
Controllers
index.js
Models
user.js
Routes
index.js
Views
error.hbs
index.hbs
layout.hbs
.env
.gitignore
package.json
server.js
require
statements)express-mvc-tsc
Client
Assets
images
.gitkeep
Content
app.css
Scripts
app.ts
Server
Config
app.ts
Controllers
index.ts
Models
user.ts
Routes
index.ts
Views
error.ejs
index.ejs
.env
.gitignore
package.json
server.ts
tsconfig.json
import
and export
statements)express-mvc-tsc-hbs
Client
Assets
images
.gitkeep
Content
app.css
Scripts
app.ts
Server
Config
app.ts
Controllers
index.ts
Models
user.ts
Routes
index.ts
Views
error.hbs
index.hbs
layout.hbs
.env
.gitignore
package.json
server.ts
tsconfig.json
import
and export
statements)express-mvc-api-js
Server
Config
app.js
db.ts
Controllers
movie.js
Models
movie.js
Routes
index.js
.env
.gitignore
movies.json
package.json
server.js
express-mvc-api-tsc
Server
Config
app.ts
db.ts
Controllers
movie.ts
Models
user.ts
Routes
index.ts
.env
.gitignore
movies.json
package.json
server.ts
tsconfig.json
mongoose
to connect to MongoDB
express-mvc-api-auth-js
Server
Config
app.js
db.ts
Controllers
auth.js
movie.js
Models
movie.js
user.js
Routes
auth.js
index.js
Util
index.js
.env
.gitignore
movies.json
package.json
server.js
express-mvc-api-auth-tsc
Server
Config
app.ts
db.ts
Controllers
auth.ts
movie.ts
Models
movie.ts
user.ts
Routes
auth.ts
index.ts
Util
index.ts
.env
.gitignore
movies.json
package.json
server.ts
tsconfig.json