-
-
In the root directory a folder named
_common
It contains the common files I needed to use in the project. It has the error object currently.- In the
managers
directory I created a folder namedmodels
it contains mongoose models I needed to use in the project. It has:Admin
modelStudent
modelClassroom
modelSchool
model
- In the
-
In the
managers/api
I Created A File namedHamza.Api.manager
it inherits fromApi.Manager
and it contains the logic to handle the API requests. -
In the
managers/api/_common
I created a files namedHamza.MethodMapper
andHamza.MethodMatrix
it contains the logic to map the request method to the functions and handel the different api endpoints. I also created the foldercontrollers
it contains the controllers for the different api endpoints.
-
-
- Admins can login, logout, and be created.
- Admins can have only one valid Token at a time.
- Once They Login again or logout the token will be invalidated.
-
- For The API Documentation see the
API.md
file.
- For The API Documentation see the
-
Make Sure You have Node.js and MongoDB installed on your machine. Also Make Sure You have Redis installed on your machine.
- Clone the project
- Run
npm install
- Create a
.env
file in the root directory and add the
LONG_TOKEN_SECRET=long_token_secret
SHORT_TOKEN_SECRET=short_token_secret
NACL_SECRET=nacl_secret
SERVICE_NAME=MY_SERVICE
USER_PORT=8000
ADMIN_PORT=8081
REDIS_URL=redis://localhost:6379
MONGO_URL=mongodb://localhost:27017/some_db