Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraction schema react app and backend (no docker yet) #348

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
sudo apt-get install -y pandoc
make htmldoc
mv extraction_schemas.html index.html
mv extraction_schema_html.html index.html

- name: Deploy docs to clulab.github.io/tomcat-text
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ extraction_schemas.html
rule_*.csv

# Metadata
*.json
*.metadata
24 changes: 24 additions & 0 deletions extraction-backend/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const express = require('express');
const app = express();
const axios = require('axios');

app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*');
next();
});

app.get('/', async (req, res) => {
try {
const response = await axios.get('http://localhost:8080/schemas');
console.log(response.data);
res.status(200).send(response.data);
} catch (error) {
console.error(error);
res.status(500).send('Error retrieving schemas.');
}
});


app.listen(9000, () => {
console.log('Server started on port 9000');
});
Loading