Skip to content

Commit

Permalink
adds arweave and artbycity configs to nuxt config
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-toth committed Oct 4, 2023
1 parent a7c7f18 commit a582598
Show file tree
Hide file tree
Showing 5 changed files with 11,866 additions and 6,979 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ logs
.env
.env.*
!.env.example

# arlocal
.db
8 changes: 6 additions & 2 deletions composables/artbycity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import ArtByCity from '@artbycity/sdk'
import Arweave from 'arweave'
import ArtByCity, { ArtByCityConfig } from '@artbycity/sdk'

const config = useRuntimeConfig()
const arweave = Arweave.init(config.public.arweave)
const abc = new ArtByCity(arweave, config.public.artbycity as ArtByCityConfig)

const abc = new ArtByCity()
export const useArtByCity = () => abc
18 changes: 17 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ArtByCityConfig } from '@artbycity/sdk';

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
// devtools: { enabled: true },
Expand Down Expand Up @@ -51,5 +53,19 @@ export default defineNuxtConfig({
/**
* Vue Router Config
*/
pages: true
pages: true,

runtimeConfig: {
public: {
arweave: {
protocol: 'http',
host: 'localhost',
port: 1984
},
artbycity: {
environment: 'development',
usernamesContractId: '-0MjbNd0EwwmnNgHefa5axa0we64kNM3BOnXITcF7n0'
}
}
}
})
Loading

0 comments on commit a582598

Please sign in to comment.