2 |
3 |
This is an about page
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # cargo build output directory
2 | target/
3 |
4 | # downloaded npm modules
5 | node_modules/
6 |
7 | # output directory for client+server builds
8 | build-output/
9 |
10 | # generated database files
11 | *.db*
12 |
13 | # ctags file
14 | tags
15 |
--------------------------------------------------------------------------------
/client/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import vuetify from './plugins/vuetify';
4 | import router from './router'
5 |
6 | Vue.config.productionTip = false
7 |
8 | new Vue({
9 | vuetify,
10 | router,
11 | render: h => h(App)
12 | }).$mount('#app')
13 |
--------------------------------------------------------------------------------
/client/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/client/README.md:
--------------------------------------------------------------------------------
1 | # rust-spa-auth
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/client/src/plugins/vuetify.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuetify from 'vuetify/lib/framework';
3 |
4 | import colours from 'vuetify/lib/util/colors';
5 |
6 | Vue.use(Vuetify);
7 |
8 | export default new Vuetify({
9 | theme: {
10 | themes: {
11 | light: {
12 | primary: colours.pink.lighten1,
13 | secondary: colours.purple,
14 | accent: colours.pink.darken2,
15 | error: colours.red.darken3,
16 | }
17 | }
18 | }
19 | });
20 |
--------------------------------------------------------------------------------
/server/run_tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Running all the tests requires enabling different sets of features, so a
3 | # simple `cargo test` is not sufficient.
4 | #
5 | # This script exists to run all of the tests.
6 |
7 | set -eu
8 |
9 | GITROOT=$(git rev-parse --show-toplevel)
10 |
11 | echo
12 | echo "Running tests with in_memory store"
13 | cargo test --features in_memory -- --nocapture
14 |
15 | echo
16 | echo "Running tests with database store"
17 |
18 | DATABASE=/tmp/.rust_spa_auth_test.db
19 |
20 | function cleanup {
21 | rm -f $DATABASE
22 | }
23 |
24 | trap cleanup EXIT
25 |
26 | cd $GITROOT/server/db
27 | ./create_sqlite3_db.sh $DATABASE
28 |
29 | DATABASE_URL=sqlite://$DATABASE cargo test -- --nocapture
30 |
--------------------------------------------------------------------------------
/server/db/create_sqlite3_db.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Creates a new sqlite3 database.
4 | # The script should be run from the same directory as the sql script
5 | # `init_sqlite3_db.sql`
6 |
7 | set -eu
8 |
9 | USAGE="$0