-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render more small details; prepare distribution webpack.
This is a hodge-podge of little things. First, as the title line indicates, there are some new little additions to the rendering, such as a dropdown for running BLASTp on protein sequences. venomkb.html now includes a link to minified jquery, which is required for the pulldown on the About button. Speaking about the "About" button, I need to finish rendering the components it contains. The big (and yet unfinished) task is adding the express and webpack configuration to prep the site for deployment. Most of what I did is from the following site: https://medium.com/@patriciolpezjuri/using-create-react-app-with-react-router-express-js-8fa658bf892d Like I said, it's still unfinished. I've figured out how to build the images to index/dist, but the site can't find the entry point for the react app itself yet.
- Loading branch information
Showing
10 changed files
with
115 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
|
||
const AboutOntology = () => | ||
<div className="jumbotron"> | ||
<div className="container"> | ||
<h2>About Venom Ontology</h2> | ||
</div> | ||
</div>; | ||
|
||
|
||
export default AboutOntology; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const imagesContext = require.context( | ||
'!!file-loader?name=[name].[ext]!.', | ||
true, | ||
/\.(svg|png|ico|xml|json)$/ | ||
); | ||
|
||
imagesContext.keys().forEach(imagesContext); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const express = require('express'); | ||
const morgan = require('morgan'); | ||
const path = require('path'); | ||
|
||
const app = express(); | ||
|
||
// Logger | ||
app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms')); | ||
|
||
// Serve static assets | ||
app.use(express.static(path.resolve(__dirname, '..', 'index', 'dist'))); | ||
|
||
// Always return index.html so react-router renders the route client-side | ||
app.get('*', (req, res) => { | ||
res.sendFile(path.resolve(__dirname, '..', 'index', 'dist', 'index.html')); | ||
}); | ||
|
||
module.exports = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
const app = require('./app'); | ||
|
||
const PORT = process.env.PORT || 9000; | ||
|
||
app.listen(PORT, () => { | ||
console.log(`App listening on port ${PORT}!`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters