Skip to content

Commit 5213b7f

Browse files
committed
license and env sample added.
1 parent a9eb67f commit 5213b7f

File tree

6 files changed

+51
-4
lines changed

6 files changed

+51
-4
lines changed

.env.sample

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Name of the application (optional)
2+
APP_NAME = My Node.js App
3+
4+
# Environment mode: 'production' or 'development'
5+
NODE_ENV = development
6+
7+
# Port for the web server to listen on
8+
PORT = 3000
9+
10+
# MongoDB connection URI
11+
MONGODB_URI = mongodb://localhost/mydatabase
12+
13+
# Redis server port
14+
REDIS_PORT = 6379
15+
16+
# Redis server authentication (if required)
17+
REDIS_AUTH = mypassword
18+
19+
# Redis server hostname or IP address
20+
REDIS_HOST = localhost
21+
22+
# Allowed CORS (Cross-Origin Resource Sharing) origin (e.g., 'https://example.com')
23+
CORS_ORIGIN = *
24+
25+
# Time to live (TTL) for data stored in Redis (in seconds)
26+
REDIS_TTL = 3600

license.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Thealan
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"fake data"
3535
],
3636
"author": "Zack",
37-
"license": "AGPLv3",
37+
"license": "MIT",
3838
"devDependencies": {
3939
"eslint": "^8.50.0",
4040
"eslint-config-prettier": "^9.0.0",

src/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import connectDB from "./config/db/index.js"
55

66
const { PORT } = Config
77

8-
async function startServer () {
8+
async function startServer() {
99
try {
1010
await connectDB()
1111
const server = app.listen(PORT, () => {

src/utils/ApiError.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class ApiError extends Error {
1212
* @param {string} stack
1313
*/
1414

15-
constructor (statusCode, message, errors = [], stack) {
15+
constructor(statusCode, message, errors = [], stack) {
1616
super(message)
1717
this.statusCode = statusCode
1818
this.data = null

src/utils/ApiResponse.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const ApiResponse = class {
2-
constructor (statusCode, data, message = "Success") {
2+
constructor(statusCode, data, message = "Success") {
33
this.statusCode = statusCode
44
this.data = data
55
this.message = message

0 commit comments

Comments
 (0)