if you are looking for a quick and ready to use typescript nodejs with express template,
look no further 😌
made with ❤️ by RashJrEdmund
get your own copy here
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.
-
run
npx degit "RashJrEdmund/node-express-js-template" my-express-appTo setup the repo locally. you can replace
my-express-appwithyour actuall app name
-
run
npm installto install all neccesarry dependencies. -
open package.json or run
npm runto see all available scripts. -
run
npm run devto start both sass:compiler and nodemone.
-
readme-assets(Folder)- run
rm -rf ./readme-assetsat the root of your project. it contains readme assest.
- run
-
README.md(File)- run
rm -rf ./README.mdat the root of your project. it contains readme it self.
- run
-
server.ts- open
src/server.ts. it is the main entry point to the application.
- open
-
express.app.ts- open
src/services/express/express.app.tsIt here that the main middle-wares likeCORSandexpress.json(). Evenejshas been setup as the templating enjine and the views directory set to views...
- open
-
express.entrypoints.ts- open
src/services/epress/express.entrypoints.ts. It is here you'll setup your routes.
- open
-
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.
- open
-
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.
- open
-
interfaces/entities.ts- open
src/utils/interfaces/entities.ts. It is here you'll setup your TypeScript interfaces.
- open
- 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
devbranch. - 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
-
- hello world
