Skip to content

Commit

Permalink
Merge pull request #89 from akhilome/ch-ui-heroku-161342218
Browse files Browse the repository at this point in the history
#161342218 Host frontend on Heroku
  • Loading branch information
akhilome committed Oct 19, 2018
2 parents 53fc895 + 3ec084c commit bfc9bd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
7 changes: 2 additions & 5 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ const app = express();
// Enable CORS
app.use(cors());

app.get('/', (req, res) => {
res.status(200).json({
message: 'Welcome. API is live at /api/v1/',
});
});
// Serve ui templates
app.use(express.static('ui'));

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
Expand Down
29 changes: 0 additions & 29 deletions tests/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,6 @@ import app from '../server';

chai.use(chaiHttp);

describe('GET /', () => {
it('should have a status code of 200', (done) => {
chai.request(app)
.get('/')
.end((err, res) => {
res.should.have.status(200);
done();
});
});

it('should have a non-empty response object', (done) => {
chai.request(app)
.get('/')
.end((err, res) => {
res.body.should.be.an('object');
done();
});
});

it('should have a message property', (done) => {
chai.request(app)
.get('/')
.end((err, res) => {
res.body.should.have.a.property('message').that.is.a('string');
done();
});
});
});

describe('GET /unassigned', () => {
it('should respond with a 404 and formatted json', (done) => {
chai.request(app)
Expand Down

0 comments on commit bfc9bd9

Please sign in to comment.