README.md 1.75 KB
Newer Older
1
# X-Cockpit
Xysto's avatar
Xysto committed
2

3
> A cockpit for your next missions
Xysto's avatar
Xysto committed
4 5 6 7 8 9 10 11 12 13

## Project structure

```
|-- app.js (main script to start the app)
|-- package.json (metadata and dependencies)
|-- gulpfile.js (specify files to watch)
|-- models
	|-- db.js (to connect to database)
	|-- users.js (define users contenttype)
14 15
|-- routes
	|-- index.js (specify routes for the app)
Xysto's avatar
Xysto committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|-- controllers
	|-- index.js (for homepage)
	|-- users.js (for users contenttype)
|-- views
	|-- users (templates for users contenttype)
	|-- partials (templates called with 'include')
	|-- layout (templates called with 'extends')
	|-- something.html (any template used by Nunjucks)
	|-- ...
|-- public
	|-- assets (any css, js or img that need to be publicly accessible)

```


## Installation

You must have nodejs and mongodb installed on your system, verify with :

`node --version && mongo --version`

Go into root folder and enter the following line in your terminal :

`npm install`

Install gulp (and associated components) : 

43
`npm install --global gulp gulp-cli gulp-rename gulp-clean-css gulp-minify`
Xysto's avatar
Xysto committed
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60


## Launch project

You may start the project with

`node app`

or use Gulp automation so that any modifications to files will reload the app and minify assets :

`gulp`

Your project is accessible at [localhost:3000](http://localhost:3000).


## About design

61
<to be completed>
Xysto's avatar
Xysto committed
62 63 64 65 66 67 68 69 70

## Various documentation

- ExpressJS : https://expressjs.com/en/starter/hello-world.html
- Mongoose (mongodb object modeling for nodejs) : https://mongoosejs.com/docs/
- Nunjucks (mozilla templating for nodejs) : https://mozilla.github.io/nunjucks/templating.html
- GulpJS (development automation) : https://gulpjs.com/
- FontAwesome (icons font) : https://fontawesome.com/icons
- Kacole2's skeleton (inspiration of this project) : https://git.io/fxQXK