Skip to content

Commit dec1ed2

Browse files
a
0 parents  commit dec1ed2

File tree

8 files changed

+1646
-0
lines changed

8 files changed

+1646
-0
lines changed

.babelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets":[
3+
"@babel/preset-env"
4+
]
5+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:alpine
2+
3+
WORKDIR '/app'
4+
5+
COPY package.json .
6+
RUN npm install
7+
COPY . .
8+
9+
CMD ["npm", "start"]

Readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This is the seed application for node js
2+
3+
## Available Scripts
4+
5+
In the project directory, you can run:
6+
> npm install
7+
> npm start
8+
> localhost:5000
9+

package-lock.json

Lines changed: 1572 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "@aakashdeveloper/create-node-app",
3+
"version": "1.0.4",
4+
"description": "The Seed will help you build node app with es6 very quick",
5+
"main": "index.js",
6+
"scripts": {
7+
"start":"node start.js"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/Aakashdeveloper/March_React_Mrng.git"
12+
},
13+
"keywords": [
14+
"Node",
15+
"Es6",
16+
"Docker",
17+
"babel"
18+
],
19+
"author": "aakashdeveloper",
20+
"license": "ISC",
21+
"bugs": {
22+
"url": "https://github.com/Aakashdeveloper/March_React_Mrng/issues"
23+
},
24+
"homepage": "https://github.com/Aakashdeveloper/March_React_Mrng#readme",
25+
"dependencies": {
26+
"@babel/core": "^7.4.3",
27+
"@babel/preset-env": "^7.4.3",
28+
"@babel/register": "^7.4.0",
29+
"babel-polyfill": "^6.26.0",
30+
"express": "^4.16.4"
31+
}
32+
}

src/app.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import express from 'express';
2+
const app = express();
3+
const port = 7600;
4+
5+
app.get('/',(req,res) => {
6+
res.send('<h1>On home page</h1>')
7+
});
8+
9+
app.get('/about',(req,res) => {
10+
res.send('<h1>On about Page</h1>')
11+
});
12+
13+
14+
app.listen(port,(err)=>{
15+
console.log(`server is running on port ${port}`)
16+
});

start.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require('@babel/register')({})
2+
module.exports = require('./src/app')

0 commit comments

Comments
 (0)