@protik-swachalit/test-npm 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/index.js +19 -0
- package/package.json +23 -0
package/README.md
ADDED
|
File without changes
|
package/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import e from 'express';
|
|
2
|
+
|
|
3
|
+
const app = e();
|
|
4
|
+
|
|
5
|
+
export const dateFormatter = (date) => {
|
|
6
|
+
const day = date.getDate();
|
|
7
|
+
const month = date.getMonth() + 1;
|
|
8
|
+
const year = date.getFullYear();
|
|
9
|
+
return `${day}/${month}/${year}`;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
app.get('/', (req, res) => {
|
|
13
|
+
const currentDate = new Date();
|
|
14
|
+
res.send('Hello World!, Today is ' + dateFormatter(currentDate));
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
app.listen(3000, () => {
|
|
18
|
+
console.log('Example app listening on port 3000!');
|
|
19
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@protik-swachalit/test-npm",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "it's package just for testing",
|
|
5
|
+
"homepage": "https://github.com/protik-swachalit/test-npm#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/protik-swachalit/test-npm/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/protik-swachalit/test-npm.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"author": "Protik Sarkar",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "index.js",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"express": "^5.2.1"
|
|
22
|
+
}
|
|
23
|
+
}
|