A Web App built with Express & Typescript
A boilerplate for Node.js App.
process.env
, DOTENV for Node.js is used.Handler
& NativeEvent
Log.info('Your message should go here!')
. Other options for logging are Log.warn
, Log.error
& Log.custom
.Note: I am mentioning only files/folders which you need to configure if required
├── dist
├── public
├── src
│ ├── controllers
│ │ ├── Api
│ │ │ ├── Auth
│ │ │ │ ├── Login.ts
│ │ │ │ ├── RefreshToken.ts
│ │ │ │ └── Register.ts
│ │ │ └── Home.ts
│ │ ├── Auth
│ │ │ ├── Login.ts
│ │ │ ├── Logout.ts
│ │ │ ├── Register.ts
│ │ │ └── Social.ts
│ │ ├── Account.ts
│ │ └── Home.ts
│ ├── exception
│ │ ├── Handler.ts
│ │ └── NativeEvent.ts
│ ├── interfaces
│ │ ├── models
│ │ │ └── user.ts
│ │ └── vendors
│ │ ├── index.ts
│ │ ├── INext.ts
│ │ ├── IRequest.ts
│ │ └── IResponse.ts
│ ├── middlewares
│ │ ├── CORS.ts
│ │ ├── CsrfToken.ts
│ │ ├── Http.ts
│ │ ├── Kernel.ts
│ │ ├── Log.ts
│ │ ├── Statics.ts
│ │ ├── StatusMonitor.ts
│ │ └── View.ts
│ ├── models
│ │ └── User.ts
│ ├── providers
│ │ ├── App.ts
│ │ ├── Cache.ts
│ │ ├── Database.ts
│ │ ├── Express.ts
│ │ ├── Locals.ts
│ │ ├── Passport.ts
│ │ ├── Queue.ts
│ │ └── Routes.ts
│ ├── routes
│ │ ├── Api.ts
│ │ └── Web.ts
│ ├── services
│ │ └── strategies
│ │ ├── Google.ts
│ │ ├── Local.ts
│ │ └── Twitter.ts
│ └── index.ts
├── views
│ ├── includes
│ ├── modals
│ ├── pages
│ ├── partials
│ ├── static
│ │ ├── css/*.css
│ │ └── js/*.js
│ └── layout.pug
├── .env
├── .gitignore
├── nodemon.json
├── package.json
├── README.md
├── tsconfig.json
└── tslint.json
Below mentioned are the steps to install, configure & run in your platform/distributions.
Note: It is preassumed here that you have mongoose running in background & you have created the database.
# Clone the repo.
git clone https://github.com/faizahmedfarooqui/nodets.git;
# Goto the cloned project folder.
cd nodets;
# Install NPM dependencies.
# Note: You can review the list of dependencies from the below link.
# https://github.com/faizahmedfarooqui/nodets/network/dependencies
npm install;
# Edit your DotEnv file using any editor of your choice.
# Please Note: You should add all the configurations details
# or else default values will be used!
vim .env;
# Run the app
npm run dev;
# Web Routes:
+--------+-------------------------+
Method | URI
+--------+-------------------------+
GET | /
GET | /signup
POST | /signup
GET | /login
POST | /login
GET | /logout
GET | /account
GET | /auth/google
GET | /auth/google/callback
GET | /auth/twitter
GET | /auth/twitter/callback
GET | /status-monitor
+--------+-------------------------+
# API Routes:
+--------+-------------------------+
Method | URI
+--------+-------------------------+
POST | /api
POST | /api/auth/login
POST | /api/auth/register
POST | /api/auth/refresh-token
+--------+-------------------------+
Note: This page has sub-sections, like about-us, contact-us & portfolio
Note: LogIn with Providers
Note: SignUp with Providers
Note: In case, the requested URI does not exist, app shows this page
Note: In case, a error is generated so instead of plain error we show under maintenance page