catchingfire 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.
Potentially problematic release.
This version of catchingfire might be problematic. Click here for more details.
- package/index.js +20 -0
- package/package.json +15 -0
package/index.js
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
// Import essential libraries
|
2
|
+
const express = require('express');
|
3
|
+
const app = express();
|
4
|
+
const path = require('path');
|
5
|
+
const router = express.Router();
|
6
|
+
// Setup essential routes
|
7
|
+
router.get('/', function(req, res) {
|
8
|
+
res.sendFile(path.join(__dirname + '/index.html'));
|
9
|
+
//__dirname : It will resolve to your project folder.
|
10
|
+
});
|
11
|
+
router.get('/about', function(req, res) {
|
12
|
+
res.sendFile(path.join(__dirname + '/about.html'));
|
13
|
+
});
|
14
|
+
router.get('/sitemap', function(req, res) {
|
15
|
+
res.sendFile(path.join(__dirname + '/sitemap.html'));
|
16
|
+
});
|
17
|
+
//add the router
|
18
|
+
app.use('/', router);
|
19
|
+
app.listen(process.env.port || 3000);
|
20
|
+
console.log('Running at Port 3000');
|
package/package.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "catchingfire",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "This is a test package",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"postinstall": "cd node_modules/burningred; npm install"
|
8
|
+
},
|
9
|
+
"dependencies": {
|
10
|
+
"burningred": "^1.0.0",
|
11
|
+
"express": "^4.18.1"
|
12
|
+
},
|
13
|
+
"author": "",
|
14
|
+
"license": "ISC"
|
15
|
+
}
|