Welcome to my repositiry
You can use these to browse through the README
This is a tool to generate a model, a routing and a controller files, for expressjs(As intentded)
- It checks if a folder
controllers,modelsandroutesexists, then creates the three files - If the directories do not exist, it creates them (no shit sherlock)
- download | clone the repo\
- add the clones directory to your
$PATHvariable - It is recommended to add an alias for easy use
gen-mrc [entity] [file-extension]
Example:
$> gen-mrc User tsWill generate these files:
controllers/UserController.ts,models/User.ts,routes/UserRoutes.ts
IMPORTANT: This is just a 0.0.1 version, some improvements will be added with time.
Generates and creates new SSH Key in your github account
$> gh-ssh-gen <key-name> <email> <token-file-path> <gh-token> <ssh-title>UPDATES:
-
token-file-path: Where do you keep your keys in your system -
gh-token: fine grained or access token that you generated and kept inside your system -
Removed setting the passphrase from the terminal (suggested seurity measure) All Are required
IMPORTANT: Using this script will have to you use your own Personal Access Token, or Fine grained ones, just make sure you set SSH Key in permissions to read and write
Installs the basic, at least to me, techs to start developing your express app
$> gen-express [--mysql | --mongoo] [--ejs | --pug]The installed npm packages are : (express dotenv bcrybt jsonwebtoken cookie-parser)
And you get to choose between mongoose or mysql using sequelize ORM , as Database providers
As for templating, you can use ejs or pug
As also will give structure to your project as such
├── config/
├── controllers/
├── index.js
├── middlewares/
├── models/
├── public/
├── README.md
├── routes/
├── views/
the index.js has a boilerplate:
import express from "express"
const PORT = process.env.PORT || 3000
const App = express()
App.get("/", (req, res, next) => {
res.send("Roman Salute")
})
App.listen(PORT, () => {
console.log("Listening to: "+PORT)
})Options are optional, duh