Commit 908853d8 authored by Felix Kopp's avatar Felix Kopp 😴 Committed by Felix Kopp

Move setup guide to doc/


(cherry picked from commit cff0be07)
parent 0ea75e44
......@@ -35,65 +35,7 @@ barely pay my rent and the development server.
## Setting Up The Development Environment
### Database Setup
Thanks to the Mongoose framework, database setup is quite simple:
Just follow the
[MongoDB install guide](https://docs.mongodb.com/v3.2/administration/install-community/)
for your operating system and set up a user account for the `devid` user
(or literally any other user name, if you so desire). Mongoose will create
all required databases automatically once the backend server is started the
first time.
### Dealing With Node
Now to the actual codebase. Clone the repository and change into its root
directory. You should have the following things:
- NodeJS 9 or higher
- npm 6 or higher
- A decent IDE with ESLint support
Since this project has a frontend and backend operating relatively
independent from each other, they both come with separate dependencies.
That's why I decided to create a total of three `package.json` files:
The one in the root directory just contains all common dependencies
required for development, and the ESLint configuration. In the root
directory, run `npm install`. Do the same thing in both the `frontend/`
and `backend/` directories.
```shell
npm install
cd frontend
npm install
cd ../backend
npm install
```
### Configuration Files
DEvid will need some configuration for the database to work properly.
Go to `backend/src/config` and copy the `*.default.js` files to their
actual names:
```shell
cd backend/src/config
cp app.default.js app.js
cp db.default.js db.js
cp smtp.default.js smtp.js
```
Then, edit the configuration values to meet your scenario. You won't need
to change anything in `smtp.js` if you don't want to set up an SMTP server
just for the sake of development; however, you will need to make a copy of
the file since the server expects it to exist. Setting the `env` property
in `app.js` to `development` will disable email delivery.
That's it! You are ready to break some stuff now. In the root directory,
type `npm-run-script start-frontend` to start the frontend server,
and `npm run-script start-backend` to start the backend server. You can
also change into the `frontend/` and `backend/` directories and run
`npm start` there directly, that's up to you.
Please see `doc/dev-setup.md` for setup instructions.
## Actual Development
......
# Setting Up A Local Development Environment
## Database Setup
Thanks to the Mongoose framework, database setup is quite simple:
Just follow the
[MongoDB install guide](https://docs.mongodb.com/v3.2/administration/install-community/)
for your operating system and set up a user account for the `devid` user
(or literally any other user name, if you so desire). Mongoose will create
all required databases automatically once the backend server is started the
first time.
## Dealing With Node
Now to the actual codebase. Clone the repository and change into its root
directory. You should have the following things:
- NodeJS 9 or higher
- npm 6 or higher
- A decent IDE with ESLint support
Since this project has a frontend and backend operating relatively
independent from each other, they both come with separate dependencies.
That's why I decided to create a total of three `package.json` files:
The one in the root directory just contains all common dependencies
required for development, and the ESLint configuration. In the root
directory, run `npm install`. Do the same thing in both the `frontend/`
and `backend/` directories.
```shell
npm install
cd frontend
npm install
cd ../backend
npm install
```
## Changing Configuration Files
DEvid will need some configuration for the database to work properly.
Go to `backend/src/config` and copy the `*.default.js` files to their
actual names:
```shell
cd backend/src/config
cp app.default.js app.js
cp db.default.js db.js
cp smtp.default.js smtp.js
```
Then, edit the configuration values to meet your scenario. You won't need
to change anything in `smtp.js` if you don't want to set up an SMTP server
just for the sake of development; however, you will need to make a copy of
the file since the server expects it to exist. Setting the `env` property
in `app.js` to `development` will disable email delivery.
That's it! You are ready to break some stuff now.
In the root directory, type
`npm-run-script start-frontend`
to start the frontend server, and
`npm run-script start-backend`
to start the backend server.
You can also change into the `frontend/` and `backend/` directories and
directly run `npm start` there, that's up to you.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment