This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "create-very-good-express-app", | |
"version": "1.0.2", | |
"description": "", | |
"main": "./create.js", | |
"bin": "./create.js", | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"express": "^4.17.2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env node | |
const fs = require("fs-extra"); | |
const installFolder = process.argv.slice(2)[0]; | |
const path = require("path"); | |
const gradient = require("gradient-string"); | |
try { | |
if (installFolder) { | |
fs.copySync(path.join(__dirname, "./template"), "./" + installFolder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env node | |
const fs = require("fs-extra"); | |
const installFolder = process.argv.slice(2)[0]; | |
const path = require("path"); | |
try { | |
if (installFolder) { | |
fs.copySync(path.join(__dirname, "./template"), "./" + installFolder); | |
console.log("Copied base files"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env node | |
const fs = require("fs-extra"); | |
const installFolder = process.argv.slice(2)[0]; | |
const path = require("path"); | |
try { | |
fs.copySync(path.join(__dirname, "./template"), "./" + installFolder); | |
console.log("Copied base files"); | |
} catch (err) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const app = express(); | |
const port = 3000; | |
app.get("/", (req, res) => { | |
res.send("Hello World!"); | |
}); | |
app.listen(port, () => { | |
console.log(`Example app listening at http://localhost:${port}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "sample-name", | |
"version": "1.0.0", | |
"description": "", | |
"main": "app.js", | |
"scripts": { | |
"start": "node app.js", | |
"dev": "nodemon app.js" | |
}, | |
"dependencies": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env node | |
const fs = require("fs-extra"); | |
const installFolder = process.argv.slice(2)[0]; | |
fs.mkdirSync("./" + installFolder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env node | |
console.log("Im working"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Router } from "express"; | |
var routesVersioning = require("express-routes-versioning")(); | |
export const router: Router = Router(); | |
router.get( | |
"/", | |
routesVersioning({ | |
"1.0.0": (req: any, res: any) => { | |
res.status(200).send({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Router } from "express"; | |
export const router: Router = Router(); | |
router.get("/", (req, res) => { | |
res.status(200).send({ | |
message: "v1" | |
}); | |
}); |
NewerOlder