diff --git a/.gitignore b/.gitignore index 3c3629e..1dcef2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +.env \ No newline at end of file diff --git a/index.js b/index.js index c3bebad..eed1454 100644 --- a/index.js +++ b/index.js @@ -2,29 +2,29 @@ // where your node app starts // init project -require('dotenv').config(); -var express = require('express'); +require("dotenv").config(); +var express = require("express"); var app = express(); // enable CORS (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) // so that your API is remotely testable by FCC -var cors = require('cors'); +var cors = require("cors"); app.use(cors({ optionsSuccessStatus: 200 })); // some legacy browsers choke on 204 // http://expressjs.com/en/starter/static-files.html -app.use(express.static('public')); +app.use(express.static("public")); // http://expressjs.com/en/starter/basic-routing.html -app.get('/', function (req, res) { - res.sendFile(__dirname + '/views/index.html'); +app.get("/", function (req, res) { + res.sendFile(__dirname + "/views/index.html"); }); // your first API endpoint... -app.get('/api/hello', function (req, res) { - res.json({ greeting: 'hello API' }); +app.get("/api/hello", function (req, res) { + res.json({ greeting: "hello API" }); }); // listen for requests :) var listener = app.listen(process.env.PORT || 3000, function () { - console.log('Your app is listening on port ' + listener.address().port); + console.log("Your app is listening on port " + listener.address().port); }); diff --git a/package.json b/package.json index 0a8e259..868bfb3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "request-header-parser-microservice", + "name": "@radii-fcc-backend/request-header-parser-microservice", "version": "0.0.2", "description": "API project for freeCodeCamp", "main": "index.js", @@ -13,17 +13,17 @@ }, "repository": { "type": "git", - "url": "https://github.com/freeCodeCamp/boilerplate-project-headerparser.git" + "url": "https://radii.dev/freeCodeCamp.org-Back-End-Dev-and-APIs/headerparser.git" }, "bugs": { - "url": "https://github.com/freeCodeCamp/freeCodeCamp/issues" + "url": "https://radii.dev/freeCodeCamp.org-Back-End-Dev-and-APIs/headerparser/issues" }, - "homepage": "https://github.com/freeCodeCamp/boilerplate-project-headerparser#readme", - "author": "freeCodeCamp ", + "homepage": "https://fcc_backend_headerparser.radii.page/", + "author": "Radii ", "keywords": [ "freeCodeCamp", "node", "express" ], - "license": "MIT" + "license": "AGPL-3.0-or-later" }