Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rashjredmund/node-express-js-template

a ready to use node js/express js template setup with typescript, sass, ejs, mongodb & mongoose.
https://github.com/rashjredmund/node-express-js-template

backend backend-service ejs ejs-template-engine ejs-templates epressjs javascript nodejs npm open-source opensource package scss template typescript

Last synced: about 1 month ago
JSON representation

a ready to use node js/express js template setup with typescript, sass, ejs, mongodb & mongoose.

Awesome Lists containing this project

README

        

# Welcome to my node-express.js template 😌



if you are looking for a quick and ready to use typescript nodejs with express template,

look no further 😌

* * *

made with ❤️ by [RashJrEdmund](https://github.com/RashJrEdmund)

get your own copy [here](https://github.com/RashJrEdmund/node-express-js-template)

* * *

## Description / Content

This template repo has been setup with TypeScript, SASS, EJS MongoDb, and Mongoose.
Also, a simple user endpoint has been created with /users, and the actuall schema created mongoose and MongoDb initiallized, but will need your mongo_connections url.

- The app template has the following dependencies added to it.
- [bcrypt](https://www.npmjs.com/package/bcrypt)
- [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken)
- [CORS](https://www.npmjs.com/package/cors)
- [nodemon](https://www.npmjs.com/package/nodemon)
- [concurrently](https://www.npmjs.com/package/concurrently)
- [dotenv](https://www.npmjs.com/package/dotenv)

## Quick start

- run

```bash
npx degit "RashJrEdmund/node-express-js-template" my-express-app
```

To setup the repo locally. you can replace my-express-app with your actuall app name

### Afterwards

- run npm install to install all neccesarry dependencies.

- open package.json or run npm run to see all available scripts.

- run npm run dev to start both sass:compiler and nodemone.

* * *

## Files/Folders to Delete

- readme-assets (Folder)
- run rm -rf ./readme-assets at the root of your project. it contains readme assest.

- README.md (File)
- run rm -rf ./README.md at the root of your project. it contains readme it self.

* * *

## Files to edit

- server.ts
- open src/server.ts. it is the main entry point to the application.

- express.app.ts
- open src/services/express/express.app.ts It here that the main middle-wares like CORS and express.json(). Even ejs has been setup as the templating enjine and the views directory set to views...

- express.entrypoints.ts
- open src/services/epress/express.entrypoints.ts. It is here you'll setup your routes.

- config.ts
- open src/config/config.ts. dotenv has been configure here, and the required configurations for ur app are here. like the db configs, app, jwt, bcrypt are all here. add anymore u see fit.

- constants.ts
- open src/services/constants.ts. dotenv has also been configure here, you could add and load some of env or add constant data/state here.

- interfaces/entities.ts
- open src/utils/interfaces/entities.ts. It is here you'll setup your TypeScript interfaces.

* * *

## Contributing

- creat and issue, i'll review it, (review could take as long as 3days, depending on the issue).
- If it's ok, you can then work on it, the create PRs to the dev branch.
- Your PR should be titled feature/< your fix(as shoten as possible):your github-username >.
- Donnot or attempt force pushing.
- Donnot push your local test branches or any branches your created that donnot follow this format, and or have anything to do with your fix

## Deployment

- ### Render

- hello world