Skip to content

zhangjunhao0/server

 
 

Repository files navigation

The CSES Server

This project was generated with Angular CLI version 1.3.2.

Development server

Set up

First things first, make sure you have the latest Node.js installed on your machine, and then run "npm install" in the root directory of this repo.

Afterwards, you will need the Angular 2 CLI to be able to compile the code. Run "npm install @angular/cli -g" to get the latest version.

Running

Run npm run serve:watch in one terminal and npm run build:watch for a dev server, the serve command starts the server stored under /server, which provides the controllers and database access routines, and the ngbuild command compiles the typescript files stored under /src into the dist directory, which provides the views. Navigate to http://localhost:3000/. The app will automatically reload if you change any of the source files.

.env Setup

You will need a .env file in the root directory of this project for some of the features to work properly (fetching Facebook events). The site should run fine without it, but in case you were wondering, an example is included at the bottom of this section. To get the accessToken and appSecret you will need to mail mbland@ucsd.edu, as they require special permissions to the CSES facebook page.

accessToken='ACCESS_TOKEN'
appSecret='APPLICATIONSECRET'

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma. Currently, given the scope of this project, there are no testing guidelines, however, showing some in the case of complex functionality is helpful.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app via ng serve.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README . If you are new to web development, read up on node.js and angular 2, or email mbland@ucsd.edu.

About

The CSES server, and all its sub-trees

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 79.3%
  • HTML 11.2%
  • JavaScript 5.7%
  • TypeScript 3.7%
  • Ruby 0.1%