The source code of the backend of Energia Powered
student activity website. The website built to provide some of organization's services and represent information about it with simplicity in mind. Also it provides an opportunity for students to collaborate and contribute to enhance their programming and train to contribute to open source community.
Make sure to have Node.js installed on your machine.
-
Clone this repo
$ git clone https://github.com/EnergiaPowered/official-website-backend.git
or usingssh
. -
$ cd official-website-backend
. -
Run
$ npm install
to install dependencies and packages in the root.
-
Create a
.env
file at the root of the project- Copy the content of
.env-example
in to the.env
file you did created. - Register for a DB URI in mongo atlas of any other service and add the
URI string
as the value ofDB_URI
variable. - Set the values of
PRIVATE_KEY
andCIPHER_PASSWORD
to any random strings you want. - Set the vaues of
EMAIL
andPASSWORD
to your email and password.
- Copy the content of
-
Run
$ npm run dev-start
to start serving the app (back), then go tohttp://localhost:4000
and start using GET requests on the following endpoints:- /blogs
- /committees
- /contactInfo
- /crew
- /events
- /message
The folder structure of the application.
.
├───.env-example
├───.gitignore
├───CONTRIBUTING.md
├───index.js
├───LICENSE
├───logo.png
├───mongo.js
├───package-lock.json
├───package.json
├───README.md
├───TODOS.txt
│
├───bin
│ ├───EmailTemplate.html
│ ├───mailer.js
│ └───unverified.js
│
├───config
│ ├───custom-environment-variables.json
│ └───default-example.json
│
├───middleware
│ ├───admin.js
│ └───auth.js
│
├───models
│ ├───Blog.js
│ ├───Committee.js
│ ├───Event.js
│ ├───Info.js
│ ├───Member.js
│ ├───Message.js
│ └───User.js
│
└───routes
├───blogs.js
├───committees.js
├───contactInfo.js
├───crew.js
├───events.js
├───login.js
├───message.js
├───users.js
└───verify.js
Follow the guides mentioned in the CONTRIBUTING.md