diff --git a/README.md b/README.md index d295ef326..f4d8b31de 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ # Talk [](https://circleci.com/gh/coralproject/talk) A commenting platform from The Coral Project. [https://coralproject.net](https://coralproject.net) +## Contributing to Talk + +### Local Dependencies +Node +Mongo + ### Getting Started `npm install` Run it once to install the dependencies. @@ -8,16 +14,22 @@ Run it once to install the dependencies. `npm start` Runs Talk. +### Running with Docker +Make sure you have Docker running first and then run `docker-compose up -d` + ### Testing `npm test` ### Lint `npm run lint` +### Helpful URLs +Bare comment stream: http://localhost:5000/client/coral-embed-stream/ +Comment stream embedded on sample article: http://localhost:5000/client/coral-embed-stream/samplearticle.html +Moderator view: http://localhost:5000/admin/ + ### Docs `swagger.yaml` -### Mantainers - ### License **Apache-2.0** diff --git a/app.js b/app.js index 838819e35..d4041c93a 100644 --- a/app.js +++ b/app.js @@ -8,6 +8,8 @@ const app = express(); // Middleware declarations. app.use(morgan('dev')); app.use(bodyParser.json()); +app.set('views', path.join(__dirname, 'views')); +app.set('view engine', 'ejs'); // API Routes. app.use('/api/v1', require('./routes/api')); @@ -15,4 +17,8 @@ app.use('/api/v1', require('./routes/api')); // Static Routes. app.use('/client/', express.static(path.join(__dirname, 'dist'))); +app.get('/admin*', (req, res) => { + res.render('admin', {basePath: '/client/coral-admin'}); +}); + module.exports = app; diff --git a/client/coral-admin/.gitignore b/client/coral-admin/.gitignore index c9c7cb580..707c890e5 100644 --- a/client/coral-admin/.gitignore +++ b/client/coral-admin/.gitignore @@ -3,5 +3,4 @@ public/bundle.js public/embed/comment-stream .DS_Store npm-debug.log -config.json yarn.lock diff --git a/client/coral-admin/config.json b/client/coral-admin/config.json new file mode 100644 index 000000000..c8f318cfc --- /dev/null +++ b/client/coral-admin/config.json @@ -0,0 +1,5 @@ +{ + "basePath": "admin", + "talkHost": "http://localhost:16180", + "xeniaHost": "http://localhost:16180" +} diff --git a/client/coral-admin/config.sample.json b/client/coral-admin/config.sample.json deleted file mode 100644 index f5b9ad5f8..000000000 --- a/client/coral-admin/config.sample.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "base": "client/coral-admin" -} diff --git a/client/coral-admin/package.json b/client/coral-admin/package.json index 3d82facbe..f19191581 100644 --- a/client/coral-admin/package.json +++ b/client/coral-admin/package.json @@ -27,8 +27,8 @@ }, "devDependencies": { "autoprefixer": "6.5.0", - "buble": "0.13.0", - "buble-loader": "0.3.0", + "babel-core": "^6.18.2", + "babel-loader": "^6.2.7", "copy-webpack-plugin": "3.0.1", "css-loader": "0.25.0", "json-loader": "0.5.4", @@ -37,7 +37,7 @@ "precss": "1.4.0", "standard": "8.2.0", "style-loader": "0.13.1", - "webpack": "2.1.0-beta.25", + "webpack": "^1.13.3", "webpack-dev-server": "1.16.1" }, "config": { diff --git a/client/coral-admin/public/index.html b/client/coral-admin/public/index.html index daf7304c8..bad30b229 100644 --- a/client/coral-admin/public/index.html +++ b/client/coral-admin/public/index.html @@ -17,6 +17,6 @@
- +