This project was generated with the Angular Full-Stack Generator version 3.3.0. A lot easier than version 4+.
SPECIAL:
- Run
npm run setup
to do all of the npm-related things. - Run
npm run setup:quick
to install all dependencies.
- Git
brew install git
- Node.js and npm
brew install node
- Express
- Angular
- MongoDB
brew install mongodb
- Yarn
npm install --global yarn
- Bower
npm install --global bower
- Gulp
npm install --global gulp
Node.js, npm, Yarn, Bower, Gulp, Grunt, Babel, Karma, Mocha, JSHint, Node Inspector, LiveReload, Protractor, Jade, Stylus, Sass, Less, and EditorConfig.
- Run
yarn install
ornpm install
to install server dependencies. - Run
bower install
to install front-end dependencies.- If there's something wrong when serving the app, run
bower install --save angular
separately, then choose the last option. This is due the currentangular-pagedown
that I'm using is about obsolete. Will upgrade it soon.
- If there's something wrong when serving the app, run
- Run
mongod
in a separate shell to keep an instance of the MongoDB Daemon running. Homebrew and Lunchy make this easy. - Fix some problems with Semantic. Just a quick rename.
- Run
gulp serve
to start the development server. It should automatically open the client in your browser when ready.
Extra
Edit server/config/local.env.js
to suit your OAuth needs.
Run gulp build
for building and gulp serve
for preview.
Run npm test
will run the unit tests with Karma.
Server Endpoint Prefix: /api
Method | URL | Description |
---|---|---|
GET | / |
Get home page |
Method | URL | Description |
---|---|---|
GET | /users |
Get list of users (if admin) |
POST | /users |
Create a user |
POST | /auth/local |
Auth with local strategy |
GET | /users/me |
Go to user home page |
DELETE | /users/:id |
Delete a user (if admin) |
GET | /users/:id/password |
Get my settings for password |
GET | /users/:userId |
Get my questions |
GET | /users/:userId/votes |
Get my voted questions |
Method | URL | Description |
---|---|---|
GET | /questions |
Get all questions |
GET | /questions/:id |
Get a question |
POST | /questions |
Post a question |
PUT | /questions/:id |
Update a question title/content |
PATCH | /questions/:id |
Patch a question title/content |
DELETE | /questions/:id |
Delete a question |
Method | URL | Description |
---|---|---|
POST | /questions/:id/answers |
Create answer for a question |
PUT | /questions/:id/answers/:answerId |
Update an answer in the question |
DELETE | /questions/:id/answers/:answerId |
Delete an answer in the question |
Method | URL | Description |
---|---|---|
POST | /questions/:id/vote |
Upvote a question |
DELETE | /questions/:id/vote |
Unvote a question |
POST | /questions/:id/answers/:answerId/vote |
Upvote an answer |
DELETE | /questions/:id/answers/:answerId/unvote |
Unvote an answer |
There is an automatic wiredep:client
in gulp process. In client/bower_components/semantic/bower.json
change the provided main
property likewise:
"main": [
"dist/semantic.min.css",
"dist/semantic.min.js"
],